Im trying to sum something using calculate but can't really figure out how.
For example
ID Value Source
---- ------- --------
A 1 Mo
B 2 Ba
A 1 Ba
C 3 Mo
B 2 Mo
D 4 Ba
What i'm trying to calculate is not to filter out either source but to take either one source. For example, if I have ID: A and both Source Mo & Ba, then pick either one for the sum and not both. Would this be possible using calculate? I thought of
Measure1 = CALCULATE(SUM(Table1),SWITCH(Table1[Source],"Mo",Table1[Value],"Ba",Table1[Value]))
(It didn't work)
Thanks in advance!
min
ormax
instead ofsum
. – Andrey Nikolov