Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have a line graph which shows the number of people by age and in the legend a separate grouping for these people. How can I display the percentage of people within that group for each age?
E.g. Within the whole of group 1, x % of these people are age 'Y' etc
Thanks!
afk
Hi @bo_afk ,
You can create the following measure:
% = DIVIDE(COUNTROWS('Table'), CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Group])))
Then add it to tooltips , then you can view the % in tooltips:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@amitchandak , @v-deddai1-msft , thanks for you suggestions!
I also have an age slicer filter on the page so that I can see the numbers for a particular age range with the "total" value for this range only. But when I apply the filter, the formula doesn't recalculate accordingly and the "total" value is excluding the filter that I applied.
Do I need to change the formula to allow slicer filters?
Hi @bo_afk ,
Please use the following measure to contains filter from page:
% = DIVIDE (
COUNTROWS ( 'Table' ),
CALCULATE ( COUNTROWS ( 'Table' ), ALLSELECTED ( 'Table'[age] ) )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @v-deddai1-msft , I gave this a go but for some reason, it's showing close to 0% or 100% for most of the ages.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.