Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
fbostan1
Frequent Visitor

Dax to subgroup a coverage volume

I need help with getting Sub_Vol Column into subgroup 

For example : 0-50,000, 50,001-150,000, 150,001-250,000

fbostan1_0-1693591568713.png

 

fbostan1_1-1693591705540.png

So I could build a visual like this:

fbostan1_2-1693591759016.png

 

Thanks for the help!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@fbostan1 , Create columns using Switch

 

Amount Bucket =  Switch( True() ,

[Amount] <50000, "    0 -50000",

[Amount] <100000, "  50000-100000",

//Add others

)

 

Same way you can create for Age

 

Either have space before bucket name to sort to create another column with same logic. To be used as sort column

 

 

Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

I'd like to try.  Share the download link of the PBI file.  Also, share the download link of an MS Excel workbook, showing the exact result.  If i can write the DAX measure for it, I should be able to tally my answer with yours that you will share in the Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@fbostan1 , Create columns using Switch

 

Amount Bucket =  Switch( True() ,

[Amount] <50000, "    0 -50000",

[Amount] <100000, "  50000-100000",

//Add others

)

 

Same way you can create for Age

 

Either have space before bucket name to sort to create another column with same logic. To be used as sort column

 

 

Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.