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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
zenisekd
Super User
Super User

Format currency based on a column and use it in column chart visual

Hi, 
so, I have a simple task that turned out to be a nightmare... 

I have three columns

CustomerCurrValue  Currency   SystemCurrValue (in CZK)
35PLN5,8
25

USD

10

15

PLN

2,5

10

USD

0,4

 

What my customer is asking me to do is to create a column chart with a slicer, where he switches currency and the column chart shows the sliced values formatted to the sliced currency. If he selects USD, he gets 35 USD, if he selects PLN, he gets 50PLN.
At the same time there will be a table, which will display 2 columns the first displaying  Customer Currency Value and the second System Currency Value . 

At first, I  thought I would use format() but that worked only for tables and matrixes, once applied to another kind of chart, it fails, because the value is in string format...
Next, I tried to use calculated groups, according to this video, but it formats all the measures (including the system currency), which is unwanted for the table visual...

Any suggestion for a simple way to do this? 

Cheers!

1 ACCEPTED SOLUTION

Change the IF statement so that the else clause returns SELECTEDMEASUREFORMATSTRING().

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

Calculation groups is the way to go. Inside the format string expression you can use SELECTEDMEASURENAME to control which base measures will be affected. You can also create a calculation item called e.g. "no formatting" which does not apply any formatting, and use that calculation item on your table.

When I used the following code: 

zenisekd_0-1666776385538.png

It worked fine for the CustomerCurrValue (Sales Frgn), however it broke the formatting of the Sale (SystemCurrValue)... It just kept it to basic number formatting...

 

zenisekd_2-1666776788466.png

 


Any further suggestions?

Change the IF statement so that the else clause returns SELECTEDMEASUREFORMATSTRING().

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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