Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Sum Values Based on Multiple Entries from Multiple Columns

Hi, I have a table as shown below:   Device ID Day Subtotal Device01 December 1st 10 Device01 December 1st 30 Device01 December 1st 15 Device02 December 1st 10 Device02 ...
  • smpa01's avatar
    4 years ago

    Anonymous you can use a measure like this

    Measure= CALCULATE(SUM(tbl[Subtotal]), ALLEXCEPT(tbl,tbl[Device ID],tbl[Day]))

  • smpa01's avatar
    4 years ago

    Anonymous  when all the axis comes form Scanner Stats

    Measure =
    CALCULATE (
        SUM ( ScannerStats[Subtotal] ),
        ALLEXCEPT ( ScannerStats, ScannerStats[DeviceId], ScannerStats[Date] )
    )

    when axis come from different tables

    Measure2 =
    CALCULATE (
        SUM ( ScannerStats[Subtotal] ),
        VALUES ( ScannerStats[DeviceId] ),
        VALUES ( DateTable[Date] )
    )
    

     

     

    pbix is attached