Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Beelover
Regular Visitor

Dynamic y axis legend

I have a line graph which trends result data by date, the issue I have is that I need to change the axis label based on which test results are being displayed.

for example the units might be degrees C or millilitres or seconds etc.

I have no problem with plotting the data or the axis re-scaling I just need to figure out how to change the axis label to show the unit of measurement.

the unit is held in a table for each result type.

any help would be gratefully received.

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

Field Parameters could probably solve your problem: https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters

I think you can just use the measurement metrics using the field parameter slicer.

View solution in original post

4 REPLIES 4
Beelover
Regular Visitor

Thank you for your reply

I don't need to add a slicer (I think) just to add a label to the graph, as below, which changes based on the data selected. the label will show one of several units of measures and is determined by the test selected. I did think that maybe a textbox that references a field (as you would in excel) might work but have no idea how you would go about that. I hope i'm making sense?

Beelover_0-1684220295761.png

 

@Beelover Hey,
You can read this blog Dynamic Attributes In A Power BI Report - P3 Adaptive

You can create a unpivot col and the add your Attribute x axis and value to Y axis.

Thanks
HarishM.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

vicky_
Super User
Super User

Field Parameters could probably solve your problem: https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters

I think you can just use the measurement metrics using the field parameter slicer.

That's sorted it thank you

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.