Forum Discussion
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
Hi PBIMike ,
Like this?
FXATE_Japan = IF( [Currency] = "JPY", [fxrate], BLANK() )FXRATE_Non-japan = IF( [Currency] = "JPY", BLANK(), [fxrate] )Or like this?
If you use 'Secondary values' label, you can't use use 'Legend' label.
Perhaps this is the best way.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- amitchandak
Super User
PBIMike , it was part of March 2020 release , refer
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-march-2020-feature-summary/#_Dual_axis
- PBIMike
Helper III
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
- v-lionel-msft
Community Support
Hi PBIMike ,
Like this?
FXATE_Japan = IF( [Currency] = "JPY", [fxrate], BLANK() )FXRATE_Non-japan = IF( [Currency] = "JPY", BLANK(), [fxrate] )Or like this?
If you use 'Secondary values' label, you can't use use 'Legend' label.
Perhaps this is the best way.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.