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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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