Hi all, in this brief post we will calculate the Quarter Number in DAX. This is useful for reporting purposes.
For this example, we will use the database WideWorldImportersDW. We will add a new column to the table Fact.Sales.
Month function, we will use this function because return the ordinal number for the date month, for example, if we use as parameter the date 'April 23, 1979' it will return a 4.
Then we will divide the result of Month by 3 because each quarter has 3 months. For this example, 4 divided by 3 equals 1.33. Then this result is the parameter for the RoundUp function which rounds the number to 2.