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
rmcgrath
Advocate II
Advocate II

Dynamic X-Axis Title in a Line Chart

Is it possible to create a dynamic X-Axis title when I am using a Parameter for the X-Axis?  I tried creating a DAX measure to put into a Card and have that below the Line Chart.  The idea being when a user makes the Parameter Slicer selection, the title in the card would change as well.  Here is what I've tried but it errors out:

SCREENSHOT:

rmcgrath_0-1729178482621.png

ERROR:

rmcgrath_1-1729178509171.png

 

DAX code for the X-Axis Title Card:

XaxisTitle = IF(SELECTEDVALUE('X-axis'[X-axis])="AGE","Age (Weeks)",IF(SELECTEDVALUE('X-axis'[X-axis])="WEEKS","Weeks",""))
1 ACCEPTED SOLUTION
Arul
Super User
Super User

@rmcgrath ,

If you created field parameter it will change by default. Refer the images,

Arul_0-1729180465237.png

Arul_1-1729180475520.png





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

Proud to be a Super User!


LinkedIn


View solution in original post

1 REPLY 1
Arul
Super User
Super User

@rmcgrath ,

If you created field parameter it will change by default. Refer the images,

Arul_0-1729180465237.png

Arul_1-1729180475520.png





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

Proud to be a Super User!


LinkedIn


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.