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.
Hi all, I want to create a dual axis line chart, Y1 axis shows the actual figure(price), Y2 axis shows the index (rebased number of price). Supposed these two lines should be totally overlapped, but in fact they are not.
What I want (produced by python):
Howerver in Power BI line chart:
I have already set the Start and End properties in Y-axis and Secondary Y-axis as Auto, but it's not working. Is it a bug or something else that I miss? For now I'm using Python visual but it cannot be viewed on web after publish, so I cannot use Python visual as the replacement.
I'm happy for any comments.
@l_ke
you can do this using a custom visual. below image shows the final result using custom visual. the two visuals overlap exactly. this is using your sample data.
This custom visual was created with our tool PBI VizEditor.
With this tool,
We are in beta testing currently, and hope to get the first general release by October 2021.
Give this a shot and let us know if you face any problem/errors.
For your convenience, I have created a custom visual that allows you to have the visual you requested and you can download it from below link
https://pbivizedit.com/gallery/dual_axis_line_overlap
You can use the editor to modify your visual further (some modifications cannot be done in Power BI window and have to be in editor). We have tried to keep it intuitive and user friendly, but for the first time user, some handholding might be needed.
If you need tutorial/guidance to use the editor (we are still limited on help files), I can help with that.
thanks,
AsitM
Hi @l_ke,
After publishing to the power bi service from the desktop, there may be some security and enforcement restrictions that will cause python visual to be disabled.
You can refer:https://powerbi.microsoft.com/de-de/blog/python-visualizations-in-power-bi-service/
For publishing to web, cunrrently it is not supported python.
Please refer:https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-publish-to-web#limitations
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Yes, I understand, so currently python visual cannot be the workaround.. That's why I'm wondering if anyone know how to deal with this "situation" (lines are not totally overlapped) :')
Hi @l_ke,
Could you provide your sample data or pbix after removing sensitive information?
I test with my sample data and it works well in my environment.
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @l_ke,
Is there a specific algorithm for converting between index columns and price?
Maybe you can create a measure to convert price to index.
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-xulin-mstf ,
Sorry for late reply as I have been busy during these days. The index is calculated by something like
price/first_value(price) over partition ([col] order by date) * 100
Can it be done in power bi? I tried but failed.
Thanks for your time.
Hi @l_ke ,
You can follow this link for dual axis its help you
https://exceleratorbi.com.au/dual-axis-line-chart-in-power-bi/
Thank & Regards
Rohit Jaiswal
Hi, thanks for your suggestion, unfortunately the lines are also not totally overlapped in this custom visual :')
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |