Skip to main content

Posts

Showing posts with the label DAX

Pizza and DAX are my Love Languages

Okay, okay, not really. Beer is though. But if my wife asks, it's "quality time spent with her watching British dramas on PBS Masterpiece." In all seriousness, if you are new to Power BI - then DAX may seem like a foreign language.  Do you want to find out some quick tips or best practices?  Well, let me give you a few tips that were helpful to me when first starting to write DAX formulas. The TAB key is your best friend.   Don’t try to type everything character for character for your formulas.   Just type until you the formula, column, table, etc. shows up directly under the formula bar.   Once, it is there hit the tab button and it automatically promotes it into your formula bar.  Is the formula text too small for you?   It’s always too small for me when doing demonstrations for others.   Place your cursor in the formula bar.   Hold down the control key on your keyboard and use your mouse scroll wheel to make the text larger or smaller...

Avoiding Unwanted Outcomes using Date Columns

Many people have dates as part of their data sets.  Dates are great to allow us to view our data aggregations in smaller buckets in order to get extra details about our situation.  Sometimes though we are faced with having multiple date columns in one table. The more date columns the better, right?   Well, this can usually lead to two outcomes.  1) Frustration that you can’t view the data based on your 2nd date column 2) Not realizing the data you are looking at is in fact NOT accurate.  I will show you in the video both of these unwanted scenarios.  More importantly, however, I will show you how you can use some fairly simple DAX and modeling relationship techniques to resolve the issue.   Let me set up the scenario in this video for you.  I’ve made a very basic Excel file that tracks sales by what state they occurred in, when the sale occurred, and when the sale shipped out.  So if I want my team to see the number of actual sales tha...

The Power of IF in POWER BI

DEMO BELOW The power of "what if" has been debated, discussed, deployed, and dreamed about for centuries. It's woven into the fabric of human nature and technology is a product of its power.  Does the IF function have a lot of power in Power BI? Sure .  But where does the power of IF have more power than in the house or in the classroom.  Mr. Peterson, IF I do the extra credit this weekend how much will my grade go up? Mr. Peterson, IF I don’t have any more missing homework assignments for the rest of the quarter will my grade improve? Mr. Peterson, IF we learn all this Algebra you are teaching how will it help me in the real world? "Dad, IF I don’t miss any more chores this week can I pick where we go out to eat tonight” My response, "IF you don’t miss any more chores, THEN you get to pick where we eat Saturday, ELSE mom and I get to pick where we eat." You see IF statements not only get the brain exploring endless possibilities, but they generate a logi...

Power BI Tricks and Tips | Our Modern Day "Cheat Codes"

Up-Up-Down-Down-Left-Right-Left-Right-B-A Up-Up-Down-Down-Left-Right-Left-Right-B-A This was a series of commands, a holy "code" that I whispered to myself over and over again on the walk home from school until it was etched in my 6th-grade brain.  Earlier that day was the first time "the code" was mentioned-- whispered about at the lunch table because my buddy Rick's older brother told him it was "technically a cheat code" and we could all go to jail or worse if we told people we knew.  It was dangerous. It was alluring. And I was eleven walking home to beat Contra for the first time. Twenty-five plus years later and cheat-codes still seem a bit enticing.

Do you want to look good on paper? Data can do that with a DATE TABLE.

Data, especially in the time of quarantine, can make you look REALLY good on paper. Or, on the screen I should say-- or in this case in a table. And if I am being honest- putting all my cards on the table (you're welcome for that pun)- I've definitely tried to use data in building a defense when my wife has called me out on something. Unfortunately for me, she knows how a cherry-picked data table can tell many different stories. Nevertheless, I persist! In this post I discuss: *DAX function CALENDARAUTO *why I broke-up with function CALENDAR *link to a demo I create *how I attempt to use a Date Table to make myself look better to my wife 😁 I’ve really loved learning about DAX functions lately during my deep dive into the world of Power BI.   As you know I have a math teaching background so it is fascinating to see how I can manipulate simple calculations to use time intelligence, override specific filters, and cross reference other tables.   One of the...

Relating "Related Tables" to Baseball because I Miss Sports

I miss sports. In particular, I miss baseball. Between learning more Power BI functions and the ins-and-outs of DAX, I've turned to Netflix to fill the deep caverns left in my soul since baseball season has been postponed. And as a result, I've thought more about tigers and big cats more than I ever have in my life. I know ALL about Carol Baskins and am fully on board for a spin-off centering on locating her lost husband. I've googled "is it really legal to own a tiger in a residential area?" Without baseball in April, I am barely hanging in there (kinda like Joe Exotic's eyebrow ring). So, I am filling the sports-sized hole by using baseball stats in Power BI to demonstrate pulling data from multiple tables and consolidating it into one table.  Some of the data we want to consolidate also has to have some aggregations (which is fancy for "calculations") performed on it.  In this demo I will attempt to break down what is really going on ...