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”
Category: DAX
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)”
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”
New DAX functions (June 2020)
Soon, 49 financial DAX functions are coming to Power BI. All the functions are available in Excel already. See the full list below. Continue reading “New DAX functions (June 2020)”
Understanding model recalculation in Power BI
Have you ever wondered why in Power BI calculated columns and calculated tables are called calculated and measures are not? That’s because in a certain sense, measures aren’t calculated, and calling them “calculated measures” is wrong. In this blog post, I’m discussing the implications of it–what recalculation in Power BI is, and how you can perform it. Continue reading “Understanding model recalculation in Power BI”
Dynamic page navigation and drillthrough
Starting in May 2020, Power BI allows you to navigate or drill through to pages by using conditional formatting. In this blog post, I’m showing how to make it work. Continue reading “Dynamic page navigation and drillthrough”
Using text measures in multi-row cards in Power BI
A not-so-well-known feature of the multi-row card visual in Power BI is that it can have its own title, called Card Title, in addition to the title any visual can have. In the image above, the Card Title is blue, and it is formatted separately from the visual title. It only works if you use one measure that returns text, and all other visuals are not text. In this blog post, I’m sharing a technique to display text as values in a multi-row card and still have the special Card Title. Continue reading “Using text measures in multi-row cards in Power BI”