The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I'm trying to build a clustered column chart to show number of bookings (Y-axis) by guest name (X-axis). The problem is that there is one instance of two different guests with the same name. This wouldn't be a problem in a table, because I'd add the unique customer ID, but on a column chart, Power BI is grouping the two guests together as if they are the same person and showing the sum of both of their bookings. My normal solution to this would be to create a custom column of customer name + customer ID and then use that new field as the X-axis, but this looks very clunky and isn't as easy to read. Is there any way to avoid this or at least make the X-axis labels easier to read?
In an ideal world, I'd have two separate bars for Ms Helen Jones, without having to add the guest ID to the X-axis label to show Power BI that they're separate guests.
Thanks in advance!
Solved! Go to Solution.
Hi @Kitty-SD
If you already include legend, then you can only append their IDs to the end of the customer's name if you want to display different customers with the same name on the x-axis, because if there is no specific column (e.g. customer ID), it will be automatically aggregated when you put the same name on the x-axis.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Kitty-SD
You can put the guset id to legend, then close the legend tab in properity.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous thanks for your suggestion. My issue is that a) I already have a legend on the graph that I'd quite like to include (sorry, I should have mentioned this!) and b) adding the Guest ID as the legend seems to make guests with 0 bookings appear at random places in the graph:
This is even after I've sorted the X-axis by booking volume in descending order. This resolves itself once I remove the Guest ID legend.
This is what my original graph looks like; you can see where there are two different guests (belonging to two different loyalty clubs) grouped together:
Thanks,
Kitty
Hi @Kitty-SD
If you already include legend, then you can only append their IDs to the end of the customer's name if you want to display different customers with the same name on the x-axis, because if there is no specific column (e.g. customer ID), it will be automatically aggregated when you put the same name on the x-axis.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.