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
sparker22
Frequent Visitor

Measure for percentage of yearly totals

I have 1 table with a column of continuous dates over 4 years, and a column of ages.

I want a measure that shows the percentage of each age group against the yearly totals, rather than total over the 4 years.

 

The current measures I have are:

        - COUNT(Table[Age])

        - COUNTROWS(ALL(Table) ...............  which gives me all rows rather than all rows per year

then - DIVIDE([AgeCount],[TotalCount])

 

Apologies for this probably simple question!

Many thanks.

1 ACCEPTED SOLUTION
HashamNiaz
Solution Sage
Solution Sage

Hi !

 

You can use the following DAX measures to get desired output;

 

Age Count = COUNT(Employee[Age])

Total Age Count = CALCULATE([Age Count], ALLSELECTED(Employee[Age Group]))

% Age = DIVIDE([Age Count], [Total Age Count])

 

Regards,

Hasham

View solution in original post

3 REPLIES 3
HashamNiaz
Solution Sage
Solution Sage

Hi !

 

You can use the following DAX measures to get desired output;

 

Age Count = COUNT(Employee[Age])

Total Age Count = CALCULATE([Age Count], ALLSELECTED(Employee[Age Group]))

% Age = DIVIDE([Age Count], [Total Age Count])

 

Regards,

Hasham

This is great, thanks!

Fowmy
Super User
Super User

@sparker22 

If you can share some sample data and the expected result, it would be of great help.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.