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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
sv98917n
Helper I
Helper I

How to subtract values from the same column

Hello all, 

 

I am currently trying to create a parameter that shows a week over week difference. I have a slicer up to based on weeks and a table below with values for each week. I would like to show the difference.

 

I currently have the current calculated column, but it is giving me the wrong result. I've changed the datatypes on the calculated column and it still doesn't do anything. 

 

So in this case we are looking at weeks 24-29

 

diff =
Tons[Value]
- CALCULATE (
SUM ( Tons[Value] ),
FILTER ( Tons, Tons[Calendar Week Number] = EARLIER ( Tons[Calendar Week Number] ) - 1 )
)
 
 

Capture.JPG

So ultimately I would like the diff column to be 55.4k-55.7k , 54.9k-55.4k etc. to show that weekly change.

 

Any help is greatly appreciated.

 

Thank you! 

 

3 REPLIES 3
Anonymous
Not applicable

Hi @sv98917n 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @sv98917n 

I have a test by my sample, but your calculated column works well.

Calculated column:

diff = 
Tons[Value]
- CALCULATE (
SUM ( Tons[Value] ),
FILTER ( Tons, Tons[Calendar Week Num] = EARLIER ( Tons[Calendar Week Num] ) - 1 )
)

My Sample:

1.png

If your table is like mine, your calculated column is correct.

I think your issue may cause by your data model.

Could you show me your sample by a screenshot or share your pbix with me by your Onedrive for Business?

This may make it easier for me to solve your problem.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

amitchandak
Super User
Super User

@sv98917n , refer my blog on Week on week, if those can help

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

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
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.