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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Like this , groups are being created in Tableau.
In power BI , I am trying to recreate them using conditional column like
is this the ideal way ?
I am looking for this result
Hi @rajendraongole1 sir . Please see if you can help.
Solved! Go to Solution.
Hi @Agent47
I would start from the highest ages and work my way to do lowest ones. This way I can avoid using too many else ifs.
After this, create another column to custom sort the bands as they will be sorted alphabetically otherwise. (Search for custom column search in Power BI)
let
band = [Age Band] //assign Age Band column to band
in
if [Age] >=28 then [Age]
else if band = "0-5" then 1
else if band = "6 to 10" then 2
else if band = "11-15" then 3
else if band = "16-20" then 4
else if band = "21-25" then 5
else if band = ">25" then 6 else null
Hi @Agent47
I would start from the highest ages and work my way to do lowest ones. This way I can avoid using too many else ifs.
After this, create another column to custom sort the bands as they will be sorted alphabetically otherwise. (Search for custom column search in Power BI)
let
band = [Age Band] //assign Age Band column to band
in
if [Age] >=28 then [Age]
else if band = "0-5" then 1
else if band = "6 to 10" then 2
else if band = "11-15" then 3
else if band = "16-20" then 4
else if band = "21-25" then 5
else if band = ">25" then 6 else null
@Agent47 You can use the "Calculation Group" feature.
https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |