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
MatH
Frequent Visitor

Struggling with Percentage of another total

Hi, I'm sorry but my mind is going completely blank and I think this should be quite simple.

 

I have a table which has a list of categories that are reasons why a caller has called us, a user can have more than one of these. I then have a measure which is Total Calls.

 

I want to be able to say each reason category was mentioned x% on total calls, and as people can have more than one reason these % should add up to more than 100%.

 

So I have a table like this:

 

CategoryCount of Category
Reason A100
Reason B124
Reason C104

 

So if we had 200 calls the % should be Reason A 50%, Reason B 62%, Reason C 52%.

 

I thought I should be able to do a query along the lines of Count of Category / Count of Calls. But this doesn't work, I'm wondering if it's because it's filtering my total calls measure?

 
Any help would be appreciated.
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@MatH Try:

Measure =
  VAR __Caller = MAX('Table'[CallerID])
  VAR __Count = SUM('Table'[Count of Category])
  VAR __CountAll = SUMX(FILTER(ALL('Table', [CallerID] = __Caller), [Count of Category])
  VAR __Result = DIVIDE( __Count, __CountAll )
RETURN
  __Result


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

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@MatH Try:

Measure =
  VAR __Caller = MAX('Table'[CallerID])
  VAR __Count = SUM('Table'[Count of Category])
  VAR __CountAll = SUMX(FILTER(ALL('Table', [CallerID] = __Caller), [Count of Category])
  VAR __Result = DIVIDE( __Count, __CountAll )
RETURN
  __Result


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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.