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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Kudoed Authors