Forum Discussion

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi elitesmitpatel ,

     

    You can create a date table using the following formula.

    Date = 
    ADDCOLUMNS (
        CALENDAR ( DATE ( 2019, 01, 01 ), DATE ( 2022, 12, 31 ) ),
        "Year", YEAR ( [Date] ),
        "Quarter", ROUNDUP ( MONTH ( [Date] ) / 3, 0 ),
        "Month", MONTH ( [Date] ),
        "Week", "Week" & WEEKNUM ( [Date] ),
        "Year-Qur",
            YEAR ( [date] ) & "Q"
                & ROUNDUP ( MONTH ( [Date] ) / 3, 0 ),
        "Year-Mon",
            YEAR ( [Date] ) * 100
                + MONTH ( [Date] ),
        "Year-Week",
            YEAR ( [Date] ) * 100
                + WEEKNUM ( [Date], 2 ),
        "Weekday", WEEKDAY ( [Date], 2 )
    )
    DayOfWeek = 
    SWITCH (
        [Weekday],
        1, "Monday",
        2, "Tuesday",
        3, "Wednesday",
        4, "Thursday",
        5, "Friday",
        6, "Saturday",
        7, "Sunday",
        BLANK ()
    )

     

    Best Regards,
    Adamk Kong

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.