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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
aurelievxx
Regular Visitor

Dynamic X-Axis with slicer based on another column

Hello,

I'm working on a Power BI report where I need to dynamically change the x-axis of a visual between 'ordre' and 'Cycle' based on slicer selections which is based on another colmn "fond_sec".

I've tried using measures directly on the x-axis, but it seems there are limitations with SELECTEDVALUE. I've also explored creating calculated columns and measures, but I'm still unable to achieve the desired dynamic behavior. Any guidance or alternative approaches would be greatly appreciated.

 

Thanks 🙂

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @aurelievxx 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

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

Hello @v-zhangti ,

 

Thanks so much for your answer.

I can't seem to attach the data in xlsx or pbix. let me know how I can share it best.

 

Here is what it looks like in a screenshot.

I would like to show ordre when the slicer is not selected, and cycle when it is. I can't create a column depending on "fondamental" and "secondaire" (eg: if fond_sec in "fondamental" or "secondaire" then cycle else ordre) because I want it to show ordre if nothing is selected, hence for secondaire and fondamental.

I tried with a measure wirh "HASONEFILTER" or "ISFILTERED" - the measure works well but can't be used as an X-Axis, so I am a bit stuck.

 

Thank you for your help,

 

Aurélie

aurelievxx_0-1698395606630.png

aurelievxx_1-1698395854501.png

 

aurelievxx
Regular Visitor

Just to add a little detail, i thought about using a bookmark but I also have a second slicer to select the year, and if I use a bookmark it always resets the year selected on the second slicer which is a problem.

 

Thanks

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors
Top Kudoed Authors