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
Agent47
Helper I
Helper I

There are groups in tableau that needs to be recreated in power BI

Agent47_0-1735538366407.png

Like this , groups are being created in Tableau. 
In power BI , I am trying to recreate them using conditional column like 

Agent47_1-1735538468837.png
is this the ideal way ?
I am looking for this result 

Agent47_2-1735538518651.png

 

Hi @rajendraongole1  sir . Please see if you can help.

1 ACCEPTED SOLUTION
danextian
Super User
Super User

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.

danextian_1-1735540624779.png

 

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

danextian_2-1735540681120.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

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.

danextian_1-1735540624779.png

 

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

danextian_2-1735540681120.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Tahreem24
Super User
Super User

@Agent47  You can use the "Calculation Group" feature.

 

https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups

 

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.