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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
alisonpappas
Helper III
Helper III

Calculating a % while excluding others in the same column

Hi All,

 

I need help with a DAX formula to do the percent of an item. I have a coulnm that consists of 5 different items, A B C D E, for example. I only want to use two in an equation: A/A+B. This number will give me the % of A the total of A and B only. Does anyone know how to calculate?

 

Thank you,

Alison

2 REPLIES 2
amitchandak
Super User
Super User

@alisonpappas , try one of the two

 

measure =
divide(calculate(Sum(Table[value]), filter(Table, Table[Column] ="A")),calculate(Sum(Table[value]), filter(Table, Table[Column] in{"A","B"})))
 or

measure =
divide(calculate(Sum(Table[value]), filter(All(Table), Table[Column] ="A")),calculate(Sum(Table[value]), filter(All(Table), Table[Column] in{"A","B"})))

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
Greg_Deckler
Community Champion
Community Champion

@alisonpappas - Hard to be specific without sample data but maybe:

Measure =
  VAR __Numerator = SUMX(FILTER(ALL('Table'),[Column]="A"),[Value])
  VAR __Denominator = SUMX(FILTER(ALL('Table'),[Column]="A" || [Column]="B"),[Value])
RETURN
  DIVIDE(__Numerator,__Denominator,0)


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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.