Forum Discussion
sum with criteria
This is an example of my data.
The Source Target is the order amount of the material in column A. For the first one, they orderd 72. Thats what I need the measure to display. Right now I have tried sum both alone and with filters, lookupvalue to create a new column.
Nothing I do works. It either wants to sum all the material in the whole column, Or just count How many times that material shows up in the column. I didn't think just pulling order qty would be so hard.
- amitchandak3 years ago
Super User
Dean_Mcghee , Not sure why you need a new column
new column
total = sum(Table[Source Target Qty])
total of material = sumx(filter(Table, Table[Material] = earlier([Material]) ) , Table[Source Target Qty])
measure will be like
new column
total = calculate(sum(Table[Source Target Qty]), allselected()) //or use all in place of allselected
total of material = sumx(filter(allselected(Table), Table[Material] = max([Material]) ) , Table[Source Target Qty])
row level total = sum(Table[Source Target Qty])