Tuesday, April 27, 2021

Power Query - IF THEN ELSE

 let

    Source = PowerBI.Dataflows(null),

    #"Added Custom" = Table.AddColumn(#"Expanded DIM_Prem_Cambio", "Value_USD", each if [Currency] = "USD" then  [Value]   

else if [Currency] = "EUR" then ([Value] * [EUR])   

else if [Currency] = "BRL" then ([Value] * [BRL]) 


else if [Currency] = "CAD" then ([Value] * [CAD]) 

else if [Currency] = "CHF" then ([Value] * [CHF]) 

else if [Currency] = "GBP" then ([Value] * [GBP]) 

else if [Currency] = "KRW" then ([Value] * [KRW]) 

else if [Currency] = "MYR" then ([Value] * [MYR]) 

else if [Currency] = "RMB" then ([Value] * [RMB]) 

else if [Currency] = "VND" then ([Value] * [VND]) 

else if [Currency] = "INR" then ([Value] * [INR]) 

else if [Currency] = "JPY" then ([Value] * [JPY]) 

else if [Currency] = "CNY" then ([Value] * [CNY]) 

else if [Currency] = "SEK" then ([Value] * [SEK]) 

else 0),

in

    #"Added Custom"

No comments:

Post a Comment

Power BI APP - Delete or Unpublish

 UNPUBLISH DELETE