Results 1 to 3 of 3

Thread: Help with the Addcolumns DAX function to create a date calendar

  1. #1
    Acolyte jazzista's Avatar
    Join Date
    Jan 2017
    Posts
    30
    Articles
    0
    Excel Version
    excel 2016

    Help with the Addcolumns DAX function to create a date calendar



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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
    Attached Files Attached Files

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,344
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    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
    Attached Files Attached Files
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3
    Acolyte jazzista's Avatar
    Join Date
    Jan 2017
    Posts
    30
    Articles
    0
    Excel Version
    excel 2016
    Quote Originally Posted by Ken Puls View Post
    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
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •