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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I have a column filled with the ages of everyone in the table. How would I use DAX to calculate the percentage of people within the age range of 20 to 35? Is DAX capable of this or would I have to use the power query?
Thank you!
Solved! Go to Solution.
Hi @srpeters ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Measure =
DIVIDE (
CALCULATE ( COUNT ( 'Table'[age] ), 'Table'[age] <= 35 && 'Table'[age] >= 20 ),
COUNTROWS ( ALL ( 'Table' ) ),
0
)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @srpeters ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Measure =
DIVIDE (
CALCULATE ( COUNT ( 'Table'[age] ), 'Table'[age] <= 35 && 'Table'[age] >= 20 ),
COUNTROWS ( ALL ( 'Table' ) ),
0
)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...