Forum Discussion
sjoshi
Helper II
8 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
8 years agoHi Greg
I'm not getting any error. Accountnum is text column
Thanks
Smita
Greg_Deckler
Community Champion
8 years agoOK, so is the formula presented a measure or a column?
Sample data would be really helpful as well. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Although, I'm thinking:
52500 = IF('LedgerTrans Fact'[AccountNum]="14850",
CALCULATE (
SUM ( 'LedgerTrans Fact'[AmountMST] ),
FILTER (ALL( 'LedgerTrans Fact'), 'LedgerTrans Fact'[AccountNum] = "52500" )
),0)