Fun with DAX – Sudoku

Posted on Jun 22, 2018 in DAX, Power BI

Carrying on from my recent article on how to build a game of Blackjack using Power BI and DAX, this time I thought I would see if I could build a fully playable game of Sudoku. A big thanks to my good friend Tom Martins over at minceddata  for giving me the idea. The end result ...

Quick DAX: Use GENERATESERIES to create Time buckets

Posted on Jun 21, 2018 in DAX, Power BI

A not so obvious use of the recently added GENERATESERIES function to use it to generate time buckets.  The more common use of this function is to generate series of numbers, but it works just as well with Time based data. Say you want to create a data table with rows that represent time periods.  ...

Fun with DAX – Blackjack Game

Posted on Jun 8, 2018 in DAX, Power BI

I thought it might be fun to try something a little different with this blog and use a combination of bookmarks with a little DAX magic to come up with a game that plays a hand of Blackjack.  Power BI and DAX are not the ideal engine to build a game of Blackjack with, but ...

DateAdd vs ParallelPeriod vs SamePeriodLastYear; DAX Time Intelligence Question

Posted on May 29, 2018

Using DAX time intelligence functions for a while; you may ask this question from yourself that what is the difference between functions below; SamePeriodLastYear function vs using ParallelPeriod with Year parameter ParallelPeriod for a month vs DateAdd for a month ago and many other questions that lead to this final question: Which function should be ...

DAX : Convert Number into Month Name

Posted on May 19, 2018 in DAX

I sometimes see requests asking how to convert a number between 1 and 12 into a month name such as “Jan” or “February. The most common solution I see offered is along the lines of a SWITCH statement that lists 12 conditions (one for each month).   This works, but can also be done using existing ...

Fun with DAX – Compressing Numeric Sequences to Text

Posted on May 15, 2018 in DAX, Power BI

A recent post on the Power BI community website asked if it was possible to compress a group of numbers into text that described the sequential ranges contained within the numbers. This might be a group of values such as 1, 2, 3, 4, 7, 8, 9, 12, 13:  (note there are gaps) with the ...

How to use RANKX in DAX (Part 3 of 3 – The Finale)

Posted on Apr 24, 2018 in DAX, Power BI

Part 1 of 3 Using RANKX in calculated measures Part 2 of 3 Using RANKX in calculated columns This article concludes my epic series detailing how to use the RANKX function in DAX.  In this episode, Frodo finally reaches Mt. Doom and successfully uses RANKX to find the best path into the mountain and complete ...

How to use RANKX in DAX (Part 2 of 3 – Calculated Measures)

Posted on Mar 16, 2018 in DAX, Power BI

The first article in this series looked at to use the RANKX function in a calculated column to apply ranking to your data. This article will show how you can use the RANKX function in a calculated measure. The PBIX file used for this article can be downloaded here. I will use the same 10-row data-set and ...

How to use RANKX in DAX (Part 1 of 3 – Calculated Columns)

Posted on Mar 2, 2018 in DAX, Power BI

How to use RANKX in DAX (Part 2 of 3 – Calculated Measures) When I first started to play with DAX, one of the functions that seemed to confuse me more than it should, was how to add ranking to my data.  It didn’t seem to matter what the data was, if I followed the ...