none
An issue with Calendar function RRS feed

  • Question

  • Hi experts 

    I'm playing with new Powerbi version Version: 2.58.5103.501 64-bit (may 2018), I tried to generate a calendar table here is what I have when trying to call calendar function

     

    Tried to verify syntax in https://www.daxformatter.com/ howerver  it seems to be correct. Is it a bug within PowerBI, if not so how to fix that issue?

    Thank you


    The complexity resides in the simplicity Follow me at: http://smartssolutions.blogspot.com


    • Edited by MASNSN Friday, May 17, 2019 2:06 PM
    Friday, May 17, 2019 2:05 PM

Answers

  • I guess two possible causes:

    1. In your screenshot you use different separators - commas and semicolons. So, if correct separator is semicolon, formula should be:

    Dates = CALENDAR(DATE(2015 ; 1 ; 1);DATE(2015 ; 12 ; 31))
    2. Also I was faced with situation then separator was comma and it was necessary to add spaces before commas (since DAX interpreted commas as decimal separators).

    • Edited by Aleksei Zhigulin Friday, May 17, 2019 2:57 PM
    • Marked as answer by MASNSN Friday, May 17, 2019 2:58 PM
    Friday, May 17, 2019 2:50 PM

All replies

  • Hi,

    You use commas instead of semicolons.

    Friday, May 17, 2019 2:24 PM
  • Hi Alex

    I tried all the combinations including the trimming letting spaces left and right or both, in deed I tried following this blog

    https://powerbi.tips/2017/11/creating-a-dax-calendar/

    also it doesn't work always similars errors messages with the calendar function 

    Thank you


    The complexity resides in the simplicity Follow me at: http://smartssolutions.blogspot.com

    Friday, May 17, 2019 2:35 PM
  • I guess two possible causes:

    1. In your screenshot you use different separators - commas and semicolons. So, if correct separator is semicolon, formula should be:

    Dates = CALENDAR(DATE(2015 ; 1 ; 1);DATE(2015 ; 12 ; 31))
    2. Also I was faced with situation then separator was comma and it was necessary to add spaces before commas (since DAX interpreted commas as decimal separators).

    • Edited by Aleksei Zhigulin Friday, May 17, 2019 2:57 PM
    • Marked as answer by MASNSN Friday, May 17, 2019 2:58 PM
    Friday, May 17, 2019 2:50 PM
  • Works as a charm so we should use semi colon ; instead of a , here is what I got as a result  when replacing , by ;

     

    The complexity resides in the simplicity Follow me at: http://smartssolutions.blogspot.com

    Friday, May 17, 2019 2:58 PM