Forum Discussion

mibu's avatar
mibu
Microsoft Employee
6 years ago
Solved

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+)... Guid...
  • v-xicai's avatar
    6 years ago

    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.