cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admin11
Impactful Individual
Impactful Individual

How to add one more condition to my expression to display correct currency sign ?

Hi All

 

Below expression work fine for SOURCE =TS :-

_CURRENCY = If(Mid(AR[Customer/Vendor Code],2,1) = "U","USD","SGD")

 

The above expression only suitable for SOURCE = TS

 

May i know how to add one more condition for above expression ?

 

If SOURCE = TA , then display SGD

If SOURCE = TP , then display MYR

If SOURCE = TI , then display IDR

 

Hope some one can advise me.

 

My sample PBI file :-

 

https://www.dropbox.com/s/ageeb7resqpsysk/PBT_SOLVE%20AR%20CURRENCY.pbix?dl=0

 

Thank you

 

Paul

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Are you looking for a SWITCH statement?

_CURRENCY =  
SWITCH (AR[SOURCE],
"TS", IF (MID(AR[Customer/Vendor Code],2,1)  = "U", "USD", "SGD") ,
"TA",  "TASGD" ,
"TP",  "MYR" ,
"TI",  "IDR" ,
"N/a no value"
)

If the logic looks right, please test at your side

View solution in original post

3 REPLIES 3
HotChilli
Super User
Super User

just create a new post - someone else can respond if I'm not around. Good luck

HotChilli
Super User
Super User

Are you looking for a SWITCH statement?

_CURRENCY =  
SWITCH (AR[SOURCE],
"TS", IF (MID(AR[Customer/Vendor Code],2,1)  = "U", "USD", "SGD") ,
"TA",  "TASGD" ,
"TP",  "MYR" ,
"TI",  "IDR" ,
"N/a no value"
)

If the logic looks right, please test at your side

View solution in original post

admin11
Impactful Individual
Impactful Individual

@HotChilli 

 

Thank you very much , now when i select SOURCE = TP , Currency will display MYR.

Thank you for your help.

 

Can i ask you follow up question , related to recode currency , using this post to ask or should i create new post ?

 

Paul Yeo

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors