Forum Discussion
Anonymous
4 years agoNot applicable
Help with sumx measure
Hi
I need help what is wrong with my measure.
AmountDKK = IF(MAX('PurchLines'[CURRENCYCODE])="DKK",SUMX('PurchLines','PurchLines'[LINEAMOUNT]),SUMX('PurchLines','PurchLines'[LINEAMOUNT]*DIVIDE('PurchLines'[EXRate],100)))
As you can see in power BI the sum of the colum says 515.599,76 but when i extrat to excel i can see that it is not right.
I tried to use sumx in my if measure but dosent seems to get it right. Can anyone help me do this measure?
I have these Tabel in my dashboard:
Anonymous , Try like
AmountDKK = Sumx(Values('PurchLines'[CURRENCYCODE]),calculate( IF(MAX('PurchLines'[CURRENCYCODE])="DKK",SUMX('PurchLines','PurchLines'[LINEAMOUNT]),SUMX('PurchLines','PurchLines'[LINEAMOUNT]*DIVIDE('PurchLines'[EXRate],100)))))
2 Replies
- amitchandak
Super User
Anonymous , Try like
AmountDKK = Sumx(Values('PurchLines'[CURRENCYCODE]),calculate( IF(MAX('PurchLines'[CURRENCYCODE])="DKK",SUMX('PurchLines','PurchLines'[LINEAMOUNT]),SUMX('PurchLines','PurchLines'[LINEAMOUNT]*DIVIDE('PurchLines'[EXRate],100)))))
- AnonymousNot applicable
Thanks alot. It worked 🙂