Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Formatting

Hello!

 

I am quite new on PowerBI. I am developing  a Dashboard for Capacity planning so I am trying to get a 15 month rolling view on my report instead of 12 months. Please help.

2 Replies

  • Anonymous , try a measure like

     

    Rolling 15 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX(Sales[Sales Date]),-15,MONTH))

     

    In case you want select a date and wan to show 15 months of data , then you need slicer on independent date table

     

    //Date1 is independent Date table, Date is joined with Table
    new measure =
    var _max = maxx(allselected(Date1),Date1[Date])
    var _min = eomonth(_max, -15) +1
    return
    calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

     

    Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

    Rolling Months Formula: https://youtu.be/GS5O4G81fww

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi Anonymous 

    Thanks for reaching out to us.

    I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.

    If you need more help, please let me know.

     

    Best Regards,

    Community Support Team _Tang

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