Forum Discussion

shyamji's avatar
shyamji
Helper I
6 years ago
Solved

Calendar For Future Dates

Hi,

i need to create a calendar from selected date to next 12 months.

Thanks

Shyamji

  • Hi shyamji 

    Great help from AilleryO, you could modify his formula.

    I modify it to show 12 months from "selected date",

    You could also use Power Query inside the "Edit queries" to create dynamic calendar table based on entered parameter.

    Please check my pbix for more details.

     

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • AilleryO's avatar
    AilleryO
    Memorable Member

    Hi,

     

    You can use CALENDARAUTO function like :

    Date = ADDCOLUMNS ( CALENDAR (DATE(2019,1,1), DATE(YEAR(NOW)+1,12,31)), "DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ), "Year", YEAR ( [Date] ), "MonthNo", FORMAT ( [Date], "MM" ), "YearMonthNo", FORMAT ( [Date], "YYYY/MM" ), "YearMonth", FORMAT ( [Date], "YYYY/mmm" ), "MonthShort", FORMAT ( [Date], "mmm" ), "MonthLong", FORMAT ( [Date], "mmmm" ), "WeekNo", WEEKDAY ( [Date] ), "WeekDay", FORMAT ( [Date], "dddd" ), "WeekDayShort", FORMAT ( [Date], "dddd" ), "Quarter", "Q" & FORMAT ( [Date], "Q" ), "YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )

    Is that helping you ? 

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi shyamji 

    Great help from AilleryO, you could modify his formula.

    I modify it to show 12 months from "selected date",

    You could also use Power Query inside the "Edit queries" to create dynamic calendar table based on entered parameter.

    Please check my pbix for more details.

     

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi shyamji 

    What is the "selected date",

    if you mean to select dates from a slicer and then get a calendar table based on this selected date, it seems impossible.

    The "table" in power bi created using "Calculated table" should be static and not affected by slicer.

     

    Best Regards

    Maggie