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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.