Forum Discussion
roshak
3 years agoFrequent Visitor
Ignore rows where fact doesn't sum to zero?
Given the following table: ID DIM1 DIM2 FACT COMMENT 1 A TEST -5.00 SHOULD BE HIDDEN 2 A TEST 5.00 SHOULD ALSO BE HIDDEN 3 B ABC -1.30 IGNORED NOTES 4 B ABC 1.30 M...
amitchandak
Super User
3 years agoroshak , Try a measure like
measure =
var _sum = calculate(sum(Data1[FACT]), filter(allselected(Data1), Data1[dim1] = max(Data1[dim1]) && Data1[dim2] = max(Data1[dim2]) && abs(Data1[FACT]) = abs(MAX(Data1[FACT])) ))
return
calculate(sum(Data1[FACT]),filter(Data1, _sum >0))
roshak
3 years agoFrequent Visitor
that is exactly what I was looking for. I used a similar approach in PowerQuery-M but needed the flexibility to have more than one type of MEASURE that allowed for different DIM column evaluations for the same logic. (i.e., one measure includes MONTH in the dimensions and another does not). thanks!