Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi all, I would like created a DAX measure to group users into multiple age ranges, it works well in table form.
But I get an error when using it in other types of visualizations (eg. pie charts / bar charts).
Any pointers are greatly appreciated 😁
= = =
Here are my tables / data :
Thank you!
Solved! Go to Solution.
Hello @holywasabi
please check if this accomodate your need.
I am not sure what kind of error did you get but if it works in table form, it should work as well in other visual
Apart from the error, please check these :
1. Created calculated column for 'Income (Grouped)'
2. Since you want to create pie chart with 'Income Range' as separator/legend, then you need to make a measure to calculate it. Create measure in 'Supporting' Table with following DAX for calculating number of row that has exact same value in 'Income (Grouped)' and 'Income Range'.
3. Plot in pie chart, 'Income Range' as legend and the previous measure (Count Customer) as Values.
After putting values in pie chart, in Visual Format, turn of legend and change Label Content (Detail Label -> Option).
Also, in your screecshot table, you only provide two kind of data, the 10k-50k and 50k-100k. The rest of categories dont show up because the value is zero.
Hope this will help you.
Thank you.
Hello @holywasabi
please check if this accomodate your need.
I am not sure what kind of error did you get but if it works in table form, it should work as well in other visual
Apart from the error, please check these :
1. Created calculated column for 'Income (Grouped)'
2. Since you want to create pie chart with 'Income Range' as separator/legend, then you need to make a measure to calculate it. Create measure in 'Supporting' Table with following DAX for calculating number of row that has exact same value in 'Income (Grouped)' and 'Income Range'.
3. Plot in pie chart, 'Income Range' as legend and the previous measure (Count Customer) as Values.
After putting values in pie chart, in Visual Format, turn of legend and change Label Content (Detail Label -> Option).
Also, in your screecshot table, you only provide two kind of data, the 10k-50k and 50k-100k. The rest of categories dont show up because the value is zero.
Hope this will help you.
Thank you.
Hello @holywasabi , remember to adhere to the decorum of the Community Forum when asking a question.
Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).
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.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.
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.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |