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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
askkumar
Frequent Visitor

dynamic bar chart for Month and Year on slicer selection

Hello Experts

 

I have a requirement where a slicer selection need to change the dimension used in bar graph.

 

I have a year slicer, if I select only one year then bar graph need to show data for months in that year and if more than one year is selected in slicer then bar graph need to show data for year, Here graph need transition between two dimensions Month and Year.

 

Tried using HasOneValue, SelectedValue but with no success.

 

Any idea would be highly appretiated.

 

Thanks

1 ACCEPTED SOLUTION
mahenkj2
Solution Sage
Solution Sage

One way of doing thing simplistically is, create a date table, with year, month column.

and then add year and month on x-axis of bar chart. At first, chart will show yearly data, so if multiple years selected in date slicer, you should be able to see all data at year level.

If only one year is selected, you just need to activate 'Drill mode' on on the chart and click the bar, it will automatically transit to month level.

 

Capture1.PNG

View solution in original post

3 REPLIES 3
mahenkj2
Solution Sage
Solution Sage

One way of doing thing simplistically is, create a date table, with year, month column.

and then add year and month on x-axis of bar chart. At first, chart will show yearly data, so if multiple years selected in date slicer, you should be able to see all data at year level.

If only one year is selected, you just need to activate 'Drill mode' on on the chart and click the bar, it will automatically transit to month level.

 

Capture1.PNG

Thanks for the reply, I am looking for the way to do it withoout user intervention, I mean not using drilldown option.

 

Can you please help me.

Hi, @askkumar 

Power BI doesn't supported it currently.
It is suggested to post your idea on Power BI Ideas.
What's more, if a feedback is highly voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,
Community Support Team _ Eason

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors