Forum Discussion
alvin199
4 years agoHelper III
Rename Axis from Auto Label
I am grouping the age using Data Groups function in Power BI. In its setting, I have selected Size of bins and Power BI auto detected the minimum and maximum values of the age column are 19 and 50 re...
- 4 years ago
Something like this as a new column...
Age Range = SWITCH( TRUE(), 'Table'[Age] < 19, "0 - 19", 'Table'[Age] < 39, "20 - 39", 'Table'[Age] < 59, "40 - 59", "60+" )Substitute your table name and column name.
KNP
4 years agoSuper User
It might be possible to create a custom label for the axis as a new column based on the bin values, but, to be honest, it is probably easier to just control the grouping yourself. This could be done in Power Query or DAX depending on your preference.
This is a good article to explain one way to approach it...
https://radacad.com/create-customized-age-bins-or-groups-in-power-bi
There are a number of links in there showing how to make it controllable with measures also.
- KNP4 years agoSuper User
Something like this as a new column...
Age Range = SWITCH( TRUE(), 'Table'[Age] < 19, "0 - 19", 'Table'[Age] < 39, "20 - 39", 'Table'[Age] < 59, "40 - 59", "60+" )Substitute your table name and column name.