ifelse
2 TopicsIssues 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.5KViews0likes5CommentsHow to use DAX/Power Query to perform calculation with multiple if else condition
Hi, I have the following table in Power BI, how do I generate the last column 'Average_Awareness_Percentage' in Power Query/DAX. I have described the intended formula for column 'Average_Awareness_Percentage'. Not sure if this can be achieved in Power Query but I have no experience using DAX either. Any help from the community to get me started with this would be helpful! Staff ID Department Year Standards QuestionNo Question Response_No Response Average_Awareness_Percentage 203382 IT 2020 IFRS15 1 Are you aware of the IFRS15 standards? 1_A Yes 1 - (Total Count Response is '1_B'/Total Count of Department is 'Accountant' where QuestionNo is '1' ) 205282 Accountant 2020 IFRS15 1 Are you aware of the IFRS15 standards? 1_B No 1 - (Total Count Response is '1_B'/Total Count of Department is 'Accountant' where QuestionNo is '1' ) 205928 Accountant 2020 IFRS15 1 Are you aware of the IFRS15 standards? 1_A Yes 1 - (Total Count Response is '1_B'/Total Count of Department is 'Accountant' where QuestionNo is '1' ) 112959 Accountant 2020 IFRS15 2 Which of the following is an exception for application of IFRS 15? 2_C Insurance (Total Count Response is '2A' + Total Count Response is '2_B') / Total Count of Department is 'Accountant' where QuestionNo is '2' 112966 Accountant 2020 IFRS15 2 Which of the following is an exception for application of IFRS 15? 2_A Music Subscription (Total Count Response is '2A' + Total Count Response is '2_B') / Total Count of Department is 'Accountant' where QuestionNo is '2' 123459 Accountant 2020 IFRS15 2 Which of the following is an exception for application of IFRS 15? 2_B Mobile Service (Total Count Response is '2A' + Total Count Response is '2_B') / Total Count of Department is 'Accountant' where QuestionNo is '2' 205262 Accountant 2020 IFRS15 2 Which of the following is an exception for application of IFRS 15? 2_D Lease (Total Count Response is '2A' + Total Count Response is '2_B') / Total Count of Department is 'Accountant' where QuestionNo is '2' 205982 IT 2020 IFRS15 2 Which of the following is an exception for application of IFRS 15? 2_E All of above (Total Count Response is '2A' + Total Count Response is '2_B') / Total Count of Department is 'Accountant' where QuestionNo is '2' 239282 Accountant 2020 IFRS15 2 Which of the following is an exception for application of IFRS 15? 2_E All of above (Total Count Response is '2A' + Total Count Response is '2_B') / Total Count of Department is 'Accountant' where QuestionNo is '2' 177959 Accountant 2020 IFRS16 3 Are you aware of the IFRS16 standards? 3_A No Total Count Response is '3_B'/Total Count of Department where QuestionNo is '3' 192902 IT 2020 IFRS16 3 Are you aware of the IFRS16 standards? 3_A No Total Count Response is '3_B'/Total Count of Department where QuestionNo is '3' 205208 Accountant 2020 IFRS16 3 Are you aware of the IFRS16 standards? 3_B Yes Total Count Response is '3_B'/Total Count of Department where QuestionNo is '3' 352959 Accountant 2020 IFRS16 3 Are you aware of the IFRS16 standards? 3_B Yes Total Count Response is '3_B'/Total Count of Department where QuestionNo is '3' 352959 Accountant 2020 IFRS16 4 Which of the following shall a lessee recognise at commencement? 4_A Right-of-use (Total Count Response is '4_A' + Total Count Response is '4_B')/Total Count Response_No is '3_B' 263935 Accountant 2020 IFRS16 4 Which of the following shall a lessee recognise at commencement? 4_B Lease-liability (Total Count Response is '4_A' + Total Count Response is '4_B')/Total Count Response_No is '3_B' 653964 Accountant 2020 IFRS16 4 Which of the following shall a lessee recognise at commencement? 4_E Uncertain (Total Count Response is '4_A' + Total Count Response is '4_B')/Total Count Response_No is '3_B' 205282 Accountant 2020 IFRS16 4 Which of the following shall a lessee recognise at commencement? 4_E Uncertain (Total Count Response is '4_A' + Total Count Response is '4_B')/Total Count Response_No is '3_B'Solved1KViews0likes3Comments