Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
shoaibalvi
Helper I
Helper I

Change the currency symbol format for a value column based on another column

In Power BI desktop, I have a data table which contains a column for values, and another column with currency short code e.g. EUR, GBP etc.

 

I wish to display the currency symbol in my visualisations which use the value column, and I know one way to achieve this is to select the value column in "data view" and select the appropriate currency symbol from the format pane.

 

However, the data table will keep changing from time to time, so sometimes the currency symbol might be CAD, on other occasions it could be EUR or AED.

 

So I am looking for a way that would dynamically change the format of the value column based on what the currency code is in the "document currency" column. I can't convert the values to a string as that would prevent the numbers / totals from displaying in the visualisations.  Any idea how i can achieve the desired result?

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @shoaibalvi 

You can use dynamic string formatting features to achieve this goal.

Please refer to the linked tutorial:

https://www.youtube.com/watch?v=kiYZxJjcD40

In your scenario, you can use your currency column instead of countries

I prepared pbix with the small sample you can download it and follow my steps

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @shoaibalvi ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft 

 

I have looked at the video but haven't been able to quite translate it to what I need at the moment. But I think its just me being stupid and the actual solution might just work and requires a bit more tweaking - I just want to give it another go before I accept the solution. This way I can share precisely what I did differently to make it work for this purpose too 🙂

 

Ritaf1983
Super User
Super User

Hi @shoaibalvi 

You can use dynamic string formatting features to achieve this goal.

Please refer to the linked tutorial:

https://www.youtube.com/watch?v=kiYZxJjcD40

In your scenario, you can use your currency column instead of countries

I prepared pbix with the small sample you can download it and follow my steps

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

Thanks a lot @Ritaf1983 !

 

I don't quite have a 1:1 relationship between the sales report and the currency table. This is because the sales report has hundreds of rows - in each row, under the "Document Currency" column there is a currency code like USD, GBP etc. However, this remains unique per sales report so whenever I updates the source data, I will have one unique currency code under "Document Currency" column.

 

On this basis, I was able to still define a many:many relationship between sales report and a "currency table" that I created, and then took assistance from the pbix file you shared. Seems to work so far!!

 

Thanks again!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.