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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculate MTD according to slicer date

Hello, 

 

I have the following measure:

 

[Measure 100] - [Value in GBP on last day of Month (Last Month)]
 
where Measure 100 = 
CALCULATE([Total EOD Balance in GBP]FILTER(ALL('V3 Measure for Changes'),'V3 Measure for Changes'[rank]=max('V3 Measure for Changes'[rank])))
 
Currently, when I select a date on the filter (the date on which is linked from the Data table) it calculates the difference between the latest value and the value at the end of the previous month. It is always fixed as it works with a rank table. This means if I choose a day other than the last date the Measure doesn't work. 
 
I would like, to, however, to create a calculation that can be used with a date slicer so that no matter what date is chosen it will calculate:
 
= [Value at that date] - [Value at the end of the previous month]
 
Thank you. 
 
Soo
1 REPLY 1
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

I create a simple test, and if we want to calculate the end of the previous month value. we could.

Measure = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),[Date]=EOMONTH(MAX('Table'[Date]),-1)))

The final show:

vyalanwumsft_0-1664443523168.pngvyalanwumsft_1-1664443565836.png

so if you want to calculate diff, you could add sum([value])-measure.


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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Kudoed Authors