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
cristianml
Post Prodigy
Post Prodigy

Various values in line chart (Fx Rate)

Hi,

I need to show various Measures in a line chart. in this case is depending of the "Location".  Any ideas / measure that could help ?

I think "Var" & "return" could work but not sure how to built that measure.

 

FX RATE.png

Thanks & regards

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @cristianml 

I think something like this is what you are looking for.  I don't know where your list of locations is (what table) or what countries you want to use EUR for but this should get you started.

 

Display Amount =
VAR _Location =
    SELECTEDVALUE ( Locations[Location] )
RETURN
    SWITCH (
        TRUE (),
        _Location = "Argentina", [FX Rate ARS],
        _Location = "China", [FX Rate CNY],
        _Location
            IN {
            "AUSTRIA",
            "BELGIUM",
            "FINLAND",
            "FRANCE",
            "GERMANY",
            "GREECE",
            "ITALY",
            "LATVIA",
            "SPAIN"
            }, [FX Rate EUR],
        _Location = "India", [FX Rate INR],
        _Location = "Poland", [FX Rate PLN]
    )

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Hello @cristianml 

I think something like this is what you are looking for.  I don't know where your list of locations is (what table) or what countries you want to use EUR for but this should get you started.

 

Display Amount =
VAR _Location =
    SELECTEDVALUE ( Locations[Location] )
RETURN
    SWITCH (
        TRUE (),
        _Location = "Argentina", [FX Rate ARS],
        _Location = "China", [FX Rate CNY],
        _Location
            IN {
            "AUSTRIA",
            "BELGIUM",
            "FINLAND",
            "FRANCE",
            "GERMANY",
            "GREECE",
            "ITALY",
            "LATVIA",
            "SPAIN"
            }, [FX Rate EUR],
        _Location = "India", [FX Rate INR],
        _Location = "Poland", [FX Rate PLN]
    )

hI @jdbuchanan71 

 

It works perfect !! Thanks!

 

perfect.jpg

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.