Forum Discussion

KristinaBakic's avatar
KristinaBakic
Frequent Visitor
10 years ago

How to use the CALENDAR() function? A practical example?

Hi!

I'm struggling to understand how to use the new CALENDAR-function. It's a new function, so no info of it's use is really around. Could someone provide a real world example on how to use it? Is it used in the abcence of an actual calendar table or used to "mark" a table as a calendar table or something else?

 

 

4 Replies

  • Shahid12523's avatar
    Shahid12523
    Community Champion

    CALENDAR() creates a date table from a start date to an end date.

     

    Example:

    Calendar =
    CALENDAR ( DATE(2019,1,1), DATE(2021,12,31) )


    → Gives a continuous [Date] column.
    Then add Year/Month/Quarter columns and mark it as a Date table for relationships.

    👉 Use it when you don’t already have a calendar table.