Forum Discussion

tarunbisht20001's avatar
tarunbisht20001
Frequent Visitor
1 year ago
Solved

Dynamic Previous Month Flag

Hello Everyone,
I have a requirement as per which i need to show previous month data of selected month in Month slicer.
For Example if Someone selects October in Fiscal month slicer we need to show September month data in the table.

Can somone help me?

3 Replies

  • Hi tarunbisht20001 

     

    one of the easiest solutions which I recommend is to to have a column as follows:

    column Year_Month = Format (your_table [date] , 'YYYYMM').

     

    then write another column to find the next month for each month as follows: (this column should used in your slicer)

     

    next_month = calculate(min(year_month) , filter (your_table , year_month > earlier (year_month)))

     

    there are some other solutions as well which I can share with you, but this one is the easiest one. let me know if it covers your expectations.

     

    If this post helps, then I would appreciate a thumbs up  and mark it as the solution to help the other members find it more quickly. 

     

    • tarunbisht20001's avatar
      tarunbisht20001
      Frequent Visitor

      I can not change column i am using for slicer as it contains past 15 dates and then months