Forum Discussion

WCrayger's avatar
WCrayger
Frequent Visitor
7 years ago
Solved

Aggregate Distinct Values

Hello,   I would like to aggregate distinct values for Extended Invoice Total Amount and Client Subtotal. I'm aware of SUMX(DISTINCT([ColumnName]), MAX(Value)) but that does not work in this scenar...
  • Anonymous's avatar
    Anonymous
    7 years ago

    try these two measures:

    Total Client SubTotal = 
    SUMX( 
        SUMMARIZE(
            Table1,Table1[client total])
        ,
        [client total]
    )
    
    Total Extended Invoice Amount = 
    SUMX( 
        ADDCOLUMNS(
            SUMMARIZE( Table1, Table1[Extended Inv Total]),
            "TEST2",
                CALCULATE(
                    MAX(Table1[Extended Inv Total])
                )
        ),
        [TEST2]
    )