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 August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to substract a row to all the row in the filtered table ?

Hello the community,

 

I have filtered my table using slicers, now I need to substract a specific row to all the rows in the filtered table. In fact, in the new table I have a unique row with 1 as a type (type column) and I need to substract it to all the others rows.

Nonetheless, it seems tricky in Power BI to do that. 

The most closely i've is to use SUMX to substract, but instead of substract it to all the rows its only substract it to the same row. 

The idea that I got is to duplicate that row in a new table but as the filtered table is dynamic due to the slicers it seems impossible for my level.

 

Whould you please give me some tips to do that please ?

 

Thanks all

2 REPLIES 2
Sahir_Maharaj
Super User
Super User

Hello @Anonymous,

 

1. Create a measure that calculates the value you want to subtract from the other rows.

SubtractionValue = CALCULATE(SUMX(MyTable, MyTable[Value]), MyTable[Type] = 1)

2. Create another measure that subtracts the SubtractionValue from the Value column for each row.

Result = MyTable[Value] - [SubtractionValue]

 

Do not hesitate to let me know if you might need further assistance.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning
Anonymous
Not applicable

Thank you, but I'm still facing to the same problem when I use SUMX. As you can see in the screenshot, It's it doesn't compute the soustraction only for the first line it's like the value was related to the value it points to.

bi substraction issue.png

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.