20.1Going beyond numbers

You created the Calendar table with CALENDARAUTO, then its first columns, the year, the quarter, the month and the week. This step completes it so that it really works in a report. You are free to organize your Calendar as you see fit. This step suggests one method among others, with a simple naming convention. “Number” for a number, “Sort” for a sort column, and the plain name for what the person viewing the report reads. Keep it, adapt it or choose your own. What matters is that each column clearly says what it holds.

20.1.1Numbers to calculate with

The first columns of a calendar are numbers. You get them with the date functions:

Year = YEAR( Calendar[Date] )
Power BI accepts this DAX forno, Measureyes, Calculated columnno, Calculated tableno, Virtual table
Quarter Number = QUARTER( Calendar[Date] )
Power BI accepts this DAX forno, Measureyes, Calculated columnno, Calculated tableno, Virtual table
Month Number = MONTH( Calendar[Date] )
Power BI accepts this DAX forno, Measureyes, Calculated columnno, Calculated tableno, Virtual table
Week Number = WEEKNUM( Calendar[Date], 2 )
Power BI accepts this DAX forno, Measureyes, Calculated columnno, Calculated tableno, Virtual table

These numbers are valuable for calculating and for sorting. But placed as they are in a visual, they say little:

Table visual, The “Revenue” measure by “Month Number”
Month NumberRevenue
1450,000
2150,000
3300,000
5250,000
7150,000
9200,000
11150,000
1250,000
Total1,700,000

This is a reproduction of the Power BI interface for teaching purposes. It differs from the real interface.

What does “3” mean? March of which year? The person reading the report should not have to decode anything. A number is for calculating, a format is for reading.

The rest of this lesson is part of izyDAX Pro

You have just read the first section. The next 2, their animations, the exercises and the summary are waiting for you with izyDAX Pro, in a single payment.