Philip Seamark shows how to convert month numbers into names in Power BI:
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 functions.
While DAX lacks a dedicated function to convert a number to a text version, such as DATENAME in T-SQL, we can get there in two functions using DATEVALUE wrapped in a FORMAT.
To demonstrate, I will create a simple table with 13 values (1 through 13) using the following calculated table.
1 Table = GENERATESERIES(1,13)This creates a single column table with 13 rows.
Read on for the rest of the story.
Comments closed