Forum Discussion

anacerco's avatar
anacerco
Frequent Visitor
7 years ago
Solved

Grouping Values

Hello.   I need help on this. I want to create group ranges based on the purchase amount of each market. I have this table:   Market  Transaction amount Date Brazil      BRL 100                 ...
  • v-yulgu-msft's avatar
    7 years ago

    Hi anacerco,

     

    How do you define the group ranges? Are they pre-defined in data source? I mean there existing a table like below:

     

    After loading into desktop, please locate to Query Editor mode first.

    Right click and duplicate the [Range] column and then split the duplicated one.

     

    Save above changes. In report view, please new below measure:

    count =
    CALCULATE (
        COUNT ( Dataset1[Transaction] ),
        FILTER (
            Dataset1,
            Dataset1[Market] = SELECTEDVALUE ( Dataset2[Market] )
                && Dataset1[Amount] >= SELECTEDVALUE ( Dataset2[Min] )
                && Dataset1[Amount] < SELECTEDVALUE ( Dataset2[Max] )
        )
    )
    

    Then, use a Matrix visual to display data.

     

    Best regards,

    Yuliana Gu