Explore Courses Blog Tutorials Interview Questions
0 votes
in BI by (17.6k points)

While building a Calendar table with PowerQuery for a PowerPivot model in Excel 2013 I use its Date.QuarterOfYear function to get the number of the quarter.

Building the same thing in SSAS Tabular requires some workarounds. There's no equivalent DAX function to get the number of the quarter from a DATE. Strangely, DAX has YEAR() and MONTH(), but no QUARTER().

Are nested IF or SWITCH statements really the only way in DAX to get the quarter number?

What is the reason for the absence of such a simple and useful function? Am I overlooking the supreme wisdom of this decision?

1 Answer

0 votes
by (47.2k points)

We should use =ROUNDUP(MONTH([Date])/3, 0) to get quarter number.

Browse Categories