PDA

View Full Version : Help with the Addcolumns DAX function to create a date calendar



jazzista
2018-06-21, 04:23 PM
Hello: I have been able to create an automatic calendar table using the addcolumns function in powerbi desktop however I have an issue with column # 6 ( Quarter Year ) : I am not getting the correct result in that column. I am using the ceiling function in order to get the quarter number however its getting the month number instead (1,2,3,4,5 ) instead of a quarter number (1,2,3,4). What am I doing wrong in my formula? Any help would be really appreciated.
Regards

Ken Puls
2018-06-21, 10:16 PM
Hey Jazzista,

My advice? Don't. Use Power Query.

A sample is attached. To add more columns, edit the query, select the Date column and go to Add Column --> Date --> Choose the one you want.

I never use the DAX calendar functions to build Calendar tables. I ALWAYS use Power Query, as they can be set up to be dynamic with your data. We actually cover this topic in great detail in our Power Query Academy (http://academy.powerquery.training)

jazzista
2018-06-21, 10:50 PM
Hey Jazzista,

My advice? Don't. Use Power Query.

A sample is attached. To add more columns, edit the query, select the Date column and go to Add Column --> Date --> Choose the one you want.

I never use the DAX calendar functions to build Calendar tables. I ALWAYS use Power Query, as they can be set up to be dynamic with your data. We actually cover this topic in great detail in our Power Query Academy (http://academy.powerquery.training)

Mr Ken: Thanks for the reply. I will follow your advice of not using dax for calendar tables. I am going to look at the calendar you created in powerquery. Thanks once again