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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors