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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
mibu
Microsoft Employee
Microsoft Employee

Groups ASPs based on a Measure

Hey Everyone,

I calculated ASP by dividing Column Revenue by Column Units...

I now want to group those ASPs into four groups as follows:  A ($0-299), A ($300-499), A ($500-999), A ($1000+)...

Guidance on how to achieve this by another Measure or Calcualted Column or some other way greatly appreciated.

Thank you!

mibu

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hello @mibu ,

You can create a calculated column as DAX below.

Group ASP =
SWITCH (
    TRUE (),
    Table1[ASP] >= 0
        && [ASP] < 300, "A ($0-299) ",
    Table1[ASP] >= 300
        && [ASP] < 500, "A ($300-499) ",
    Table1[ASP] >= 500
        && [ASP] < 1000, "A ($500-999)",
    Table1[ASP] >= 1000, "A ($1000+)"
)

NOTE: The .pbix link you shared cannot be opened.

Best regards

Amy

Community Support Team _ Amy

If this post helps,then consider Accepting it as the solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hello @mibu ,

You can create a calculated column as DAX below.

Group ASP =
SWITCH (
    TRUE (),
    Table1[ASP] >= 0
        && [ASP] < 300, "A ($0-299) ",
    Table1[ASP] >= 300
        && [ASP] < 500, "A ($300-499) ",
    Table1[ASP] >= 500
        && [ASP] < 1000, "A ($500-999)",
    Table1[ASP] >= 1000, "A ($1000+)"
)

NOTE: The .pbix link you shared cannot be opened.

Best regards

Amy

Community Support Team _ Amy

If this post helps,then consider Accepting it as the solution to help other members find it more quickly.

amitchandak
Super User
Super User

@mibu , refer SEGMENTATION/Binning

https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
https://radacad.com/dynamic-banding-or-grouping-in-power-bi-using-dax-measures-choose-the-size-of-bi...
https://www.credera.com/blog/technology-solutions/creating-aging-report-using-a-user-selected-date-i...

 

https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-po...

https://www.daxpatterns.com/static-segmentation/

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
mibu
Microsoft Employee
Microsoft Employee

Thanks for your reply!

All following files on Dropbox:

Pls see dev .pbix file here

Pls see FactSales Excel file here

Pls see Dimpbdev Excel file here

What I am trying to achieve is a calculated column... grouping ASP into four groups... that I can then create a connection to in Dimpbdev.

Thanks in advance for your help!

Best,

mibu

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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