ifelse
1 TopicIssues with IF and Switch statement
Dear All, DAX Newbie here, I am performing calculations based on exchange rates for multiple currencies, I have tried with nested IF and Switch statement the calculations are fine but the sum is not working as expected. ID Name ACCTINGCURRAMOUNT Exch Rate REPORTING Amount REPORTINGCURRENCY 1 ACT1 10000 1 10000 BHD 2 ACT2 20050 0.376 7538.8 USD 3 ACT3 23044 0.475 10945.9 GBP 4 ACT4 34500 0.376 12972 USD 5 ACT5 13450 1 13450 BHD 101044 101044 REporting amount should come as 54906.7, but it just replicate the sum of ACCTINGCURRAMOUNT. Below is my switch statement, Pls suggest some solutions. REPORTING Amount= SWITCH( SELECTEDVALUE(Transactions[REPORTINGCURRENCY]), "BHD", sum(Transactions[ACCTINGCURRAMOUNT]),"USD", sum(Transactions[ACCTINGCURRAMOUNT]) * 0.376, "GBP", SUM(Transactions[ACCTINGCURRAMOUNT])* 0.475, SUM(Transactions[ACCTINGCURRAMOUNT]) )Solved1.5KViews0likes5Comments