Forum Discussion

Chips2220's avatar
Chips2220
Regular Visitor
4 years ago
Solved

Sum based on a particular column

Could you please help with the following. In Power BI desktop I'm trying to create a table which does the following:

 

- Provides a sum for each reference number based on the highest number tied to that reference number. For example QER-23 would return as 4 in column A and 4 in column B. QER-25 would return 4 in column B and 5 in column B

 

Is is possible to do this without removing the other rows as these are not duplicates. There are other columns with unique rows but for the purposes of this examples I've left it as is. 

 

2 Replies

  • Hi Chips2220 ,

     

    You would just create measures like this:

    _yourMeasureA = MAX(yourTable[Column A])
    
    _yourMeasureB = MAX(yourTable[Column B])

     

    When used in a visual with the [Reference number] column as a context filter it will do what you need.

     

    Pete

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi Chips2220 ,

     

    You can directly drag columns and mark summerization as "MAX".

    Output:-

     

    Thanks,

    Samarth