Forum Discussion
sjoshi
Helper II
7 years agoIF, FILTER SUM Function
Hello, I'm trying to do one simple thing but not sure why filter is not working If accountnum ="14850" the take sum of amount for accountnum "52500" else null. This statement I have tried to ...
sjoshi
Helper II
7 years agoHello
I have written below measure by removing the if statement then its giving me total sum
select sum(amountmst) from ledgertrans_fact where ledgertrans.accountnum='52500' its not applying other time and project slicers and retruning same value in each row.
52500 = CALCULATE (
SUM ( 'LedgerTrans Fact'[AmountMST] ),
FILTER ( ALL('LedgerTrans Fact'), 'LedgerTrans Fact'[AccountNum] = "52500"))
If I take below mesure then its giving probelm in IF condition.
52500 = IF('LedgerTrans Fact'[AccountNum]="14850",
CALCULATE (
SUM ( 'LedgerTrans Fact'[AmountMST] ),
FILTER (ALL( 'LedgerTrans Fact'), 'LedgerTrans Fact'[AccountNum] = "52500" )
),0)
sjoshi
Helper II
7 years agoAlso when I add 52500 measure in values then all other working columns such amountmst, prior quarter etc are not working fine.