Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Could anyone kindly help me on this:
If I have a data set for example:
Category | Sub-category | Sales |
Fruit | Apple | 23 |
Fruit | Watermelon | 12 |
Vegetables | Carrot | 25 |
Vegetables | Tomato | 35 |
Drink | Orange juice | 21 |
Drink | Apple juice | 12 |
Drink | Melon juice | 16 |
I plan to add one graph to show percentages, firstly the percentage of sales of each category vs total sales, then if I click to go in to details (the 2-arrow icon on the graph), I can have the percentage of sales of each sub-category vs the total sales of that category, rather than vs the total sales of all category.
Is this possible? Thank you so much!
Solved! Go to Solution.
Hi @Anonymous
Create measures
percent =
IF (
ISINSCOPE ( 'Table'[Category] ),
SUM ( 'Table'[Sales] ) / CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table' ) ),
IF (
ISINSCOPE ( 'Table'[Sub-category] ),
SUM ( 'Table'[Sales] )
/ CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER ( ALL ( 'Table' ), 'Table'[Category] = MAX ( 'Table'[Category] ) )
),
SUM ( 'Table'[Sales] ) / SUM ( 'Table'[Sales] )
)
)
Hi @Anonymous
Create measures
percent =
IF (
ISINSCOPE ( 'Table'[Category] ),
SUM ( 'Table'[Sales] ) / CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table' ) ),
IF (
ISINSCOPE ( 'Table'[Sub-category] ),
SUM ( 'Table'[Sales] )
/ CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER ( ALL ( 'Table' ), 'Table'[Category] = MAX ( 'Table'[Category] ) )
),
SUM ( 'Table'[Sales] ) / SUM ( 'Table'[Sales] )
)
)
Thank you so much!!! This is exactly what I want to achieve!
So like the attached? Table 3, Page 3. I just used Show As Percent of Grand Total. You need to use the single drill down arrow to get percentage of the subcategory for the category.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.