Skip to main content

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.


Apart from trying to learn the hard, advanced technical background of all that is Power BI, there is also another world out there of quick tips and tricks that are not talked about as much.  Now, I have been lucky to be surrounded by coworkers who have helped me with them. I feel like these are those cheat codes in a video game that were shared at middle school cafeteria tables. Here are three I have been using quite a bit and would be useful for someone who is starting out their journey in PowerBI.

1) Make a measures table to house all of your calculated measures you make using DAX.  The reason I like this is that most measures we use to analyze our data will apply to multiple tables because a measure doesn’t need to have a relationship with a table to work.  We also will use measures within other measures, so it can get confusing to an end-user why one measure is housed in one table of data in our fields pane even though we use it for other calculations. 

I also like to put a special character in front of my table name so that it either is always located at the top in my field pane or at the very bottom.  I usually use a forward slash “/” to get it right at the top.

To make a table when in report view, go to the home ribbon and click Enter Data.

No need to put in any info into the table at this point.  Just name your table and click load.  Again, I like to put that forward slash in front so it will bring this table to the top of the fields pane.


And voila you have a measures table where you can house all measures for your reports

 2) When we get a copious amount of dimension tables you are usually guaranteed to have lots of key columns.  We know these are important to make our relationships in the model view so our tables can talk and share data with one another. (Here is a blog I wrote about that vital info.) 
After those relationships are done, there is no need for our end-user to see those key columns.
  We can, of course, right-click on them in the fields view and select hide column.  What if we have 20 or so key columns though?  Who wants to waste their time going through that whole process? I’m sure I could use those extra 5-8 minutes searching up "Do they still make Contra or Mike Tyson Punch-Out?"

So here is your fix:  Go to the modeling view.  Expand the table you want to hide your key columns and then control select them.  Then, in your properties pane right next to the field pane you can toggle the switch “Is Hidden” to “On”.

You want to make it even faster?  If the people who prepared the data for you put the word key in the columns that have key data for our relationships you are Oh So Lucky.  In the fields pane, type the word key, and all the columns with the key in it will show up from ALL of your tables.  Now control select and mark “Is Hidden” to “On”.


  

 3) This ties into the last shortcut.  Power BI will take any whole number data type that was designated in the Power Query editor and implicitly do a default summarization on it.  Well, many times we don’t want the data for those columns summarized when we put them in a visual.  Think dates as a prime example.  We can go to the fields pane, click (Not Check) the column we don’t want to be summarized, and then go to the column tools ribbon and switch it from “Sum” to “Don’t Summarize”.  Not a hard thing to do, but if we have lots of columns in our data that we don’t want to be summarized this could be a bear.

Like earlier, we are headed to the model view.  Control-click all the columns in the field pane that you don’t want to be summarized.  Now, click on the Advanced option in the properties pane, go to summarize by and change to “None”

I know these tricks won't give you 30 extra lives or help you defeat Don Flamenco the second time, but they just might save you time. 
                      


Comments

Popular posts from this blog

Best Practice To Trim Before Removing Duplicates or Merging In Power Query Editor

In last week’s blog, I wrote and did a video about how to remove duplicate records and keep the most recent entry as long as a date column was part of the data source.   I came across the scenario while giving training on Power BI with my company Pragmatic Works.   See the video below:     This week, while doing another two-day training I came across a different scenario from a follow-up conversation from day 1.   I had explained how to remove duplicate records and one of the students started working on a Power BI project she has for her company.   On day 2 the student informed me that her remove duplicates step was not working.   I said that is odd and I asked to see the data.   In one of her table visuals, I could see that it appeared that a few of the records had duplicates based on the name column.   After further investigation though, we figured out the culprit.     She had done all the steps correctly, but it was a data integrity issue.   In her data source, the perso

The Power of CALCULATE in Power BI

Last week in my blog and video I discussed how Power BI could have made my life as a teacher much easier.  It is not that Power BI can do things that I could not on my own.  It is the fact that Power BI could have saved me so much time.   This led me to some thoughts and questions.   How could I have impacted the students more in the classroom with this extra time?  Would teachers who were not analyzing student data due to time constraints now start?  How can I make the data tell my students a story that gives them an accurate picture of their progress?   That last question is what leads to this week’s blog.   Many times the metrics (which is just a fancy word for "numbers") of what we want to show are easy to do by hand with a basic math background.  Although easy, it can be very time consuming when dealing with different groups of data: like 6 periods of students instead of 1 period. When we want to do these calculations quickly with minimal effort in Power BI it is not

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