Forum Discussion

t_young's avatar
t_young
Regular Visitor
1 year ago
Solved

Measure Total Incorrect

I know there are a bunch of threads about this matter, but none of the solutions that I've found seem to work for my particular measure. Below is the data that I am working with:   Amount is ...
  • Fowmy's avatar
    1 year ago

    t_young 

    This should work for you:

    Amount = 
    SUMX(
       SUMMARIZE( Table, Table[Parent Part] , Table[Sub Part] , Table[Order #] ),
        VAR ShippedQty = CALCULATE( AVERAGE(Table[Qty]) )
        VAR UnitCost = CALCULATE( AVERAGE(Table[Unit Cost]) )
        VAR QtyPer = CALCULATE( SUM(Table[QtyPer]) )
        RETURN
        (
            ( UnitCost * QtyPer ) * .25
        ) * ShippedQty
    )