Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi there,
I need to calculate a measure wherein if condition 1 is met and condition 2 is met then do the sum.
e.g. calculate sum revenue if siteid ="1234" and Item no <> ("A234","B345","M3456")
Many thanks,
Solved! Go to Solution.
Put the conditions in a set of () the seperate them with || which is OR.
Revenue Meausure =
CALCULATE (
SUM ( YourTable[Revenue] ),
( YourTable[siteid] = "1234" && NOT YourTable[Item No] IN { "A234", "B345", "M3456" } )
||
( YourTable[siteid] = "2345" && NOT YourTable[Item No] IN { "B345", "M3456" } )
)
Put the conditions in a set of () the seperate them with || which is OR.
Revenue Meausure =
CALCULATE (
SUM ( YourTable[Revenue] ),
( YourTable[siteid] = "1234" && NOT YourTable[Item No] IN { "A234", "B345", "M3456" } )
||
( YourTable[siteid] = "2345" && NOT YourTable[Item No] IN { "B345", "M3456" } )
)
Try it like this.
Revenue Meausure =
CALCULATE (
SUM ( YourTable[Revenue] ),
YourTable[siteid] = "1234"
&& NOT YourTable[Item No] IN { "A234", "B345", "M3456" }
)
Thanks @jdbuchanan71
I will also need the same with multiple siteid.
e.g. if siteid ="1234" and Item no <> ("A234","B345","M3456") then sum revenue
if siteid ="2345" and Item no <> ("B345","M3456") then sum revenue
and so on