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
smithshire
Frequent Visitor

Calculate the difference between calculated values in matrix visual

I have a matrix visual which displays a calculated measure of the total spend for each customer for the selected months.

The month names are derived from a calendar table.

I need to add an additional column to show the spend difference

 

CustomerFebruaryMarch
Test Customer 1£1,838.84£1,396.22
Test Customer 2£2,258.71£1,104.65
Test Customer 3£5,273.80£5,811.98
Test Customer 4£1,506.00£1,702.00

 

With difference :-

 

CustomerFebruaryMarchDifference
Test Customer 1£1,838.84£1,396.22-£442.62
Test Customer 2£2,258.71£1,104.65-£1,154.06
Test Customer 3£5,273.80£5,811.98£538.18
Test Customer 4£1,506.00£1,702.00£196.00

 

What would the best way to achieve this?

 

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@smithshire , these are measure then we create measure like

 

This moth Vs last month

 

MTD = CALCULATE(AverageX(values('Date'[Date]), calculate(SUM(Table[Qunatity Produced])) ),DATESMTD('Date'[Date]))

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

 

And we can take diff

 

 

Select Two period and take diff

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
smithshire
Frequent Visitor

's great - thanks.

amitchandak
Super User
Super User

@smithshire , these are measure then we create measure like

 

This moth Vs last month

 

MTD = CALCULATE(AverageX(values('Date'[Date]), calculate(SUM(Table[Qunatity Produced])) ),DATESMTD('Date'[Date]))

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

 

And we can take diff

 

 

Select Two period and take diff

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.