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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chapin4u
Employee
Employee

Working with dual currencies format

Hi, need help with the following:

The PBI report has a slicer of 2 currencies, US$ and Euro. Have a matrix visual with prices. 

What is needed is to display the prices formatted according to the currency selected.

 

Please advise how can I do this.

 

Thanks 

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@Chapin4u wrote:

Hi, need help with the following:

The PBI report has a slicer of 2 currencies, US$ and Euro. Have a matrix visual with prices. 

What is needed is to display the prices formatted according to the currency selected.

 

Please advise how can I do this.

 

Thanks 


@Chapin4u

You could try to create a measure if you have a table like

Capture.PNG

 

price Measure =
SWITCH (
    ISFILTERED ( price[currency] ) && HASONEVALUE ( price[currency] ),
    LASTNONBLANK ( price[currency], "" ) = "Euro", FORMAT ( MAX ( price[price] ), "€##.00" ),
    LASTNONBLANK ( price[currency], "" ) = "US$", FORMAT ( MAX ( price[price] ), "$##.00" ),
    FORMAT ( MAX ( price[price] ), "$##.00" ) //if the slicer doesn't pick up any currency, use US$ by default
)

Capture.PNGCapture.PNG

View solution in original post

3 REPLIES 3
Eric_Zhang
Employee
Employee


@Chapin4u wrote:

Hi, need help with the following:

The PBI report has a slicer of 2 currencies, US$ and Euro. Have a matrix visual with prices. 

What is needed is to display the prices formatted according to the currency selected.

 

Please advise how can I do this.

 

Thanks 


@Chapin4u

You could try to create a measure if you have a table like

Capture.PNG

 

price Measure =
SWITCH (
    ISFILTERED ( price[currency] ) && HASONEVALUE ( price[currency] ),
    LASTNONBLANK ( price[currency], "" ) = "Euro", FORMAT ( MAX ( price[price] ), "€##.00" ),
    LASTNONBLANK ( price[currency], "" ) = "US$", FORMAT ( MAX ( price[price] ), "$##.00" ),
    FORMAT ( MAX ( price[price] ), "$##.00" ) //if the slicer doesn't pick up any currency, use US$ by default
)

Capture.PNGCapture.PNG

Thanks for taking your time to show me the solution and the screen shots.

Phil_Seamark
Employee
Employee

Hi @Chapin4u

 

You can use the FORMAT function to create formatting to suit

 

eg,.

 

Currency US = FORMAT(100,"$##.00")

or

Currency EU = FORMAT(100,"€##.00")

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.