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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
tuulia
Helper IV
Helper IV

Change x-axis by slicer

Hi,

I want the visuals linked to slicer to display the selected values at the selected hierarchy level. Bookmarks or extra buttons is not an option. Drilldown in visuals is not a possible solution either.

 

For example, if user selects Dep1 and Dep2 from hierarchy slicer the x-axis in visual should show texts “Dep1” and “Dep2” below bars. How can I achieve this?

 

Company

     Division1

            Dep1

            Dep2

    Division2

            Dep3

            Dep4

1 ACCEPTED SOLUTION
AnkitKukreja
Super User
Super User

Hi @tuulia 

 

Please view my report and access the dynamic x-axis filter and let me know if this is what you're looking for?

 

https://app.powerbi.com/view?r=eyJrIjoiZjRiMzk0ODAtYWJmMi00YWY1LWJkNjEtMmViNmIxYjljNWRhIiwidCI6ImVhY...

 

 

Thanks,

Ankit

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

View solution in original post

16 REPLIES 16
AnkitKukreja
Super User
Super User

Hi @tuulia 

 

Please view my report and access the dynamic x-axis filter and let me know if this is what you're looking for?

 

https://app.powerbi.com/view?r=eyJrIjoiZjRiMzk0ODAtYWJmMi00YWY1LWJkNjEtMmViNmIxYjljNWRhIiwidCI6ImVhY...

 

 

Thanks,

Ankit

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

@AnkitKukrejaI think this is the best workaround and it seems to be quite flexible. I belive these extrabuttons are ok to endusers.

@AnkitKukrejaThank you, but extra buttons (like this "Dynamic X-axis") is not a required outcome..

manikumar34
Solution Sage
Solution Sage

@tuulia , 

 

Create a table with Unpivoted kind like below. 

 

Division1            Dep1
Division2            Dep2
    Division2            Dep3
    Division3            Dep4

 

On measure Use TREATAS to change the column dynamically.

 

Regards,

Manikumar

 





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Anonymous
Not applicable

@tuulia Please find a Dummy Power BI model here.

 

Appreciate your kudos!! Mark my post as solution if this helps.

amitchandak
Super User
Super User

@tuulia , You can have a dynamic title, not an axis name.

measure like

concatenatex(Table, table[dept],"and")

or

concatenatex(Table, table[dept],",")

 

refer: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-format-visual-titles

https://www.bluegranite.com/blog/create-a-dynamic-title-in-power-bi-updated

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Thank you, but requirement is to show selected values in x-axis..

Anonymous
Not applicable

@tuulia - just change the visual type to stacked column chart on the PBIX which I provided. That will cometo x-axis.

 

Appreciate your kudos!! Mark this post as solution if this helps.

@Anonymous This is nice solution, but it's not possible to create same kind tables you use (too much data/big cube..)

Anonymous
Not applicable

@tuulia what kinda chart you want to use?

The data would change accordingly if you use this one.

 

Appreciate your kudos!! Mark my post as solution if this helps.

@Anonymousit's a barchart. This is the requirement I am trying to solve

 

tuulia_0-1602587123779.png

 

Anonymous
Not applicable

@tuulia Use this custom visual instead of your bar chart and then see how it behaves-

https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380857?tab=Overview

 

Appreciate your kudos!! Mark my post as solution if this helps.

@Anonymous  thanx for this tip, I think this visual will be useful in future, but it didn't solve my problem..

Anonymous
Not applicable

@tuulia 

Please have a look at these posts to check if it could help you.

https://radacad.com/dynamic-x-axis-on-charts-power-bi

https://www.kasperonbi.com/dynamically-switching-axis-on-visuals-with-power-bi/

https://community.powerbi.com/t5/Desktop/Dynamic-change-in-X-Axis/td-p/86167

 

Appreciate your kudos if you find this informative!! Mark this post as solution if this helps you.

@Anonymous  I have seen these links thx! These solutions has extra buttons etc (against requirements). 

Anonymous
Not applicable

@tuulia , Okay, if possible share sample data which would help to replicate.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.