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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dats
Resolver I
Resolver I

Conditionally change x-axis

Hi,

 

Suppose I have the following calendar table:

 

DateYearWeekNumberWeekNumber2
01.01.2021202153w 53 2021
..............

 

and respectively a data table containing of Date, as well through which both tables are connected.

 

For visuales I have a slider through which either one or a range of years can be selcted. And a line chart with ValueShare on the Y-Axis and currently on the x - axis showing "WeekNumber".

 

year.png

 

examplelinchart.png

 

Is it possible to implement some kind of dax switch or so to conditionally change the x-axis.

For example: Whenever the year 2021 is part of the selection I want to have "WeekNumber2" as the x - axis rather than "WeekNumber"?

 

Would be cool to "hear" your ideas on this

 

dats

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dats ,

 

About the dynamic x-axis, you can refer to:

Dynamic change in X Axis

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @dats ,

 

About the dynamic x-axis, you can refer to:

Dynamic change in X Axis

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@dats it is not something out of the box but check this video and you can tweak use it to meet you need.

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

HI @parry2k thanks for the idea. I will keep that in mind for further projects.

But I believe this does  not work with my Year-slider which I have to/want to use..

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors