Forum Discussion
Dynamic Axis Relabelling
- 4 months ago
Hi doubleclick
are you looking for an output similar to this ?
if this is what you are looking for then , i have attached the sample i have created for your reference
- 4 months ago
No, a parameter table isn’t necessary for this. Parameter tables are typically used for switching measures, but it’s not needed here.
For your situation, you only need a column with the labels use the real name for the selected supplier and (Supplier 1, 2…) for the others and place that on the X-axis.
This makes the setup much simpler, as there’s no need for a parameter table.
I hope this helps clarify things.
the idea is you can’t make the X-axis itself truly dynamic with a measure, especially with 5000 suppliers, Power BI wants a physical column there what I meant is instead of trying to rename on the fly, you precompute something stable like a rank per supplier (for example by total spend), then use that rank to generate labels, so your logic becomes “if this is the selected supplier show real name, otherwise show Supplier + rank”,
with 5000 suppliers you really don’t want to do this purely in measures, it’ll get slow and unpredictable, so better to create a helper table (or calculated column) that already contains SupplierID, Rank, and a default label like “Supplier 1, Supplier 2”, then your measure only swaps the label for the selected one
Best regards,
Daniele
please could you elaborate a bit further, i put your reponse through gpt but i don't think it fully understood.
i can't use any measure in teh x axis of a bar chart? this is hard rule. Not sure if that's where you're going with this?
- V-yubandi-msft4 months agoCommunity Support
Hi doubleclick ,
That's a good question. The key point is that Power BI doesn’t support measures on the X-axis, only columns. Instead of renaming items dynamically with a measure, you should create a column that includes the labels you want.
For instance, the selected supplier would display the actual name, while others would be labeled as Supplier 1, Supplier 2, and so on. You can then use this column in your chart. The axis itself isn’t dynamic rather, the column is structured to provide the desired result.
Please review and let me know if this aligns with your expectations.