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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.