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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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