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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
KW123
Helper V
Helper V

Rolling 12 months date slicer

Hi, 

I have a measure which is pulling customer accounts with a declining balance over rolling 12 months.  If there is a decline, the column shows 1, I then filter out accounts with 1. 

25 =
VAR a=FILTER(ALLSELECTED('Tab 2'),'Tab 2'[ShareId]=SELECTEDVALUE('Tab 2'[ShareId]))
VAR b= MAXX(FILTER(a,'Tab 2'[ReportMonth]=MAXX(ALLSELECTED('Tab 2'[ReportMonth]),[ReportMonth])),[CurrentBalance])
VAR c= MINX(FILTER(a,[ReportMonth]=MINX(ALLSELECTED('Tab 2'[ReportMonth]),[ReportMonth])),[CurrentBalance])
VAR d= DIVIDE(b-c,b,0)
return if(d<=-0.25,1,0)

I then have a measure to calcuate the sum of each account in the last 12 months 
Last 12 months =
CALCULATE(SUM('Tab 2'[CurrentBalance]), DATESINPERIOD('Dates'[Date],MAX('Dates'[Date]), -12, MONTH))

However, when I add a date slicer, the values aren't changing. Any help would be appreciated.  

Would also love to know if there is a way to calculate the declining balances as a calculated column instead?

Thanks! 




2 REPLIES 2
FreemanZ
Super User
Super User

hi @KW123 

are you feeding the date slicer with the date column from the Dates table?

Hi @FreemanZ 
Yes, I've tried it with both the [ReportMonth] and the [Date] from the Dates table 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.