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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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

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.

Top Solution Authors