Do you know what CALCULATE with just one argument does? In a measure? In a calculated column? This is the topic of this blog post. Continue reading “Power BI Antipatterns #5: CALCULATE”
Power BI Antipatterns #4: YEAR + MONTH
How many ways there are to create a Year-Month column in DAX? In this blog post, I’ll show you one bad way, one OK way, one good, and one great way. Continue reading “Power BI Antipatterns #4: YEAR + MONTH”
Power BI Antipatterns #3: Table functions
Do you think Microsoft’s own files always follow best practices? Think again! In this episode, I’m dissecting a calculated table DAX formula from a system file generated automatically in Power BI service. Continue reading “Power BI Antipatterns #3: Table functions”
Power BI Antipatterns #2: SELECTEDVALUE
The pilot issue of the Power BI Antipatterns series received good feedback, and I’m back with the second blog post in the series, in which I’m going to discuss the SELECTEDVALUE function. Continue reading “Power BI Antipatterns #2: SELECTEDVALUE”
Power BI Antipatterns #1: SWITCH(TRUE… in DAX (The Pilot)
Welcome to Power BI Antipatterns, my new blog post series! Over the past few years, as I’ve been working as an independent consultant, I’ve seen many examples of practices in Power BI that were less than optimal. In other words, they weren’t best practices. What’s curious is that sometimes very different people wrote code in the same (bad) way. So I thought I’d like to dissect some of the antipatterns, and I’m starting with the misuse of the SWITCH function in DAX.
Continue reading “Power BI Antipatterns #1: SWITCH(TRUE… in DAX (The Pilot)”
SWITCH and SWITCH(TRUE… in Power Query
Ever wanted to mimic the SWITCH
function from DAX (or CASE ... WHEN
from SQL) in Power Query, including the SWITCH(TRUE...
behavior? In this blog post, I’m providing a function that does just that.
Power Query in dataflows vs. datasets
A few months ago I participated in Q&A in the Sydney Power BI User Group, and one person asked whether we should write our queries in datasets or dataflows. The Q&A format doesn’t allow you to spend too much time on a single question, so in this blog posts I’m providing a more comprehensive comparison of the two options. Continue reading “Power Query in dataflows vs. datasets”
Microsoft Exam Ref DA-100 is now available!
Almost three years ago, my first book, Exam Ref 70-778, was published. Microsoft Exam 70-778 is now phased out, and Microsoft Exam DA-100 replaced it. The new official Power BI exam reference book, Exam Ref DA-100, is now available through Microsoft Press Store, Amazon, and other places! Continue reading “Microsoft Exam Ref DA-100 is now available!”
Built-in column sort order in Power BI
The sort by column feature of Power BI hides some potentially unwanted complexities. This blog post shows how you can avoid having to sort a column by another column while maintaining a custom sort order. Continue reading “Built-in column sort order in Power BI”
Single-letter day and month names in Power BI
Occasionally in Power BI, you may want to display day or month names as single letters to save space. This may result in duplicates because neither day nor month names are unique when you shorten them to one letter. In this blog post, I’m showing two solutions to the problem: one in DAX and one in Power Query (M language). Continue reading “Single-letter day and month names in Power BI”