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
PBIMike
Helper III
Helper III

Line Graph Y2 axis

Hello,

 

I have data with just 3 columns: date / currency / fx rate.

Most of my currencies fall between 1.2 and 1.9, so work well on the y-axis. Japanese Yen, however, is between 130 and 150. I would like to plot this on the same line graph, but using the Y2 axis on the right. However, none of these fields can be dragged into the Y2 data field.

 

Is it possible to achieve this?

 

Many thanks,

Mike

1 ACCEPTED SOLUTION

Hi @PBIMike ,

 

Like this?

FXATE_Japan = 
IF(
    [Currency] = "JPY",
    [fxrate],
    BLANK()
)
FXRATE_Non-japan = 
IF(
    [Currency] = "JPY",
    BLANK(),
    [fxrate]
)

 

j2.PNG

Or like this?j3.PNG

If you use 'Secondary values' label, you can't use use 'Legend' label.

 

Perhaps this is the best way.

j4.PNG

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

Thanks Amit, but I'm afraid that doesn't solve my problem, as all the link says is to "drag fields into the new secondary Y-axis field". have tried dragging in every field, and none of them will remain under the Y2 heading.

 

I suppose my problem is that I want to use the same values for both y-axis and y2, but with one filtered to only apply to Japanese Yen, and the other to apply to all currencies.

 

Will Y2 only work when using a single data source, with a 2nd column of values?

 

Many thanks,

Mike

Hi @PBIMike ,

 

Like this?

FXATE_Japan = 
IF(
    [Currency] = "JPY",
    [fxrate],
    BLANK()
)
FXRATE_Non-japan = 
IF(
    [Currency] = "JPY",
    BLANK(),
    [fxrate]
)

 

j2.PNG

Or like this?j3.PNG

If you use 'Secondary values' label, you can't use use 'Legend' label.

 

Perhaps this is the best way.

j4.PNG

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

 

I have Exchange Rate and Dimdate data and have to create a line chart with the data. And I'm using Region and Country slicer where the line chart shows the sum of exchange rate(Y axis) not individual exchange rate for respective Country.

Please help me with this.

 

Thanks

Thank you that looks incredibly helpful - i'll give it a go!

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.