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
Anmolgan
Post Prodigy
Post Prodigy

How to filter out a column value and only perform addition and subtraction as per that column value?

I am using the below dax to filter out a value as per a column value and narrow down all the calculations:

 

OEMSALES= Calculate([GMMargin], Filter('TableA', [Column1]= "Sales"))

 

GMMargin is my measure here, so as per the above DAX this will filter out only the values that have "Sales" in Column1 right, and whenever I use this measure as a number chart it changes only as per Sales column and turns out to be blank for all other values that make sense, but when I define the above in a variable and perform some addition subtraction, it just does not falls out to be in correct place, do anyone has any idea how can i define the variable in above so that I can only see the calculations of Sales values in column1??

 

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Seems like there is missing information here, I can't be sure of what you are asking. If you are asking that if you take what you have provided in the formula and do some extra addition and subtraction that you get data in places other than sales, then you could create a separate measure that does something like:

 

Measure = IF(ISBLANK([GMMargin]),BLANK(),<DO YOUR CALCULATION HERE>)

So basically, if that measure you have is blank, return blank, otherwise do you additional addition and subtraction calculation.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I want to filter out a column according to a value stored in those columns, and after filtering I need to add up all those values that comes after filtering out a column.

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.