Forum Discussion

coffjoh2004's avatar
coffjoh2004
Regular Visitor
3 years ago

SumX measure not summing each level

I am building a matrix where the value is a measure that multiplies an average unit price with a quantity. There are 3 row levels that i can drill down to. System -> work order -> item

 

Value measure: 

cost = if(HASONEFILTER(Query1[ITEM#]),[aup*qty],sumx(query1,[aup*qty]))
 
The aup* qty is a background measure that does exactly what the title implies

Item# is the bottom level of the matrix, so it works for each item but when i roll it up to the work order level, it doesn't calculate correctly

 

how could i rewrite the measure so the work order level is the sum of all the items, and the top level (system) is the sum of all the work orders?

 

thanks!

1 Reply

  • coffjoh2004 , aup and qty are from same table, you should simply create a measure like

     

    Sumx(Table, [aup] * [qty])