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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ltekchandani
Frequent Visitor

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

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors