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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Undefined

If I have a slicer that contains YTD, MTD, QTD and has a bar chart of sales vs date. when we click on YTD it will show only one bar on the Bar chart, when I click on QTD then it will show 4 bars according to quarter when we click on MTD it will show monthly data bars.

How can we achieve this?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Agree with @amitchandak .

 

Below is my simple sample, which used Bookmarks and Selections:

Eyelyn9_0-1645598787754.png

Output:
bookmarks.gif

 

Best Regards,
Eyelyn Qin
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

5 REPLIES 5
Anonymous
Not applicable

Hey @amitchandak @Anonymous,
Thanks for giving the solution.

I have also worked on it and I got a solution. I am sharing that with you.

Creating a Switch table by using above DAX.Creating a Switch table by using above DAX.

 

Create a calendar table.Create a calendar table.

Pic8.PNG

Take slicer and put  Type of table switch in itTake slicer and put Type of table switch in it

 

Take a bar chart and put values and table values in it .Take a bar chart and put values and table values in it .

 

Pic6.PNG

 

Pic7.PNG

 

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

Anonymous
Not applicable

Hi @Anonymous ,

 

Thanks for your sharing !!! It's much more efficient than my workaround.

Please Accept yours as the solution. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

This is so usefull Thank you for sharing Yashashri....!!!!

Anonymous
Not applicable

Hi @Anonymous ,

 

Agree with @amitchandak .

 

Below is my simple sample, which used Bookmarks and Selections:

Eyelyn9_0-1645598787754.png

Output:
bookmarks.gif

 

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

amitchandak
Super User
Super User

@Anonymous , If you want to change the axis. In this case the best option is to use bookmarks

Axis Slicer
Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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