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
Anonymous
Not applicable

Custom Calculation for % Share at each Hierarchy Level

Hi,

I have data like this:

 

ApplicationShowid
NetflixThe Office1
NetflixThe Office2
NetflixThe Office3
NetflixThe Office4
NetflixFriends3
NetflixFriends4
NetflixFriends5
Amazon PrimeDhamaal2
Amazon PrimeDhamaal4
Amazon PrimeDhamaal5
Amazon PrimeHindi4
Amazon PrimeHindi5

 

And I have to display this table in PowerBI

 

ApplicationShowUnique ID Count% Total ID Share% of Application ID Share
NetflixThe Office480%100%
NetflixFriends360%75%
Amazon PrimeDhamaal360%100%
Amazon PrimeHindi240%67%

 

Here are the definitions for Calculated Columns:

% Total ID Share = How many % of Total TVs also watch XYZ show

% Application ID Share = How many % of TVs watch Netflix also watch XYZ show

 

I want to get a Measure formula for "% Application ID Share" column. I have tried using "Show as Percent of Grand Total", "Show as Percent of Row Total" but that does not work for me. Can somebody help?

 

Thank you!

1 REPLY 1
lbendlin
Super User
Super User

I think your expected result is slightly off. Netflix serves all five IDs.

 

 

 

ID Share = DIVIDE(DISTINCTCOUNT('Table'[id]),CALCULATE(DISTINCTCOUNT('Table'[id]),ALL('Table')),0)

App Share = DIVIDE(DISTINCTCOUNT('Table'[id]),CALCULATE(DISTINCTCOUNT('Table'[id]),REMOVEFILTERS('Table'[Show])),0)

 

 

lbendlin_0-1640552632777.png

 

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.