Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tarunbisht20001
Frequent Visitor

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?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tarunbisht20001 ,

 

Please try to create a calculated table.

Sample:

vxiaocliumsft_0-1729568553404.png

vxiaocliumsft_1-1729568573451.png

vxiaocliumsft_2-1729568588372.png

 

Best Regards,

Wearsky

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @tarunbisht20001 ,

 

Please try to create a calculated table.

Sample:

vxiaocliumsft_0-1729568553404.png

vxiaocliumsft_1-1729568573451.png

vxiaocliumsft_2-1729568588372.png

 

Best Regards,

Wearsky

Selva-Salimi
Super User
Super User

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. 

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.