cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dusdau Frequent Visitor
Frequent Visitor

Dynamically changing months on a vertical bar chart

Hi All,

 

I'm new to Power BI and I'm trying to achieve something which feels elusive at the moment.  I've googled and searched this forum and have gotten close but I feel my requirement is a little different that what I've seen others do.  Here it is:

 

The desire is to have a slicer at the top with the following options: Rolling 12, Calendar YTD, Fiscal YTD

 

Depending on the selection, the MONTHS on the vertical bar chart x-axis of the vertical bar chart would change.

 

If they select Rolling 12 they want to see sales for the last 12 months, so if its September 2018 they want to see sales for September 2017 thru August 2018, with Month/year on the bar chart, so x-axis would look like this:

 

 

Sept 17, Oct 17, Nov 17, Dec 17, Jan 18, Feb 18, Mar 18, Apr 18, May 18, June 18, July 18, Aug 18

 

If they select Fiscal YTD, the months on the x axis should show the current year fiscal months in order, again for sept 18 (fiscal 2019) it would show:

 

July, August, September, October, November, December, January, February, March, April, May, June

 

If they select Calendar YTD, the months on the x axis should simply show the current year months in calendar order:

 

January, February, March, April, May, June, July, August, September, October, November, December

 

I have a Date dimension that has different columns for calendar month (sorted on calendar month number) and fiscal month (sorted on fiscal month number), so it seems to me it would just be a matter of toggling the x-axis between those.  That seems doable based on some of the things I've seen online, like this:  

 

https://www.youtube.com/watch?v=lFd2hjkKz_Q

 

However, I'm not sure how I would even approach the Rolling 12 Months one.  I thought maybe I would need to dynamically create the rolling months in my Date dimension, but unsure about that.

 

Any ideas on how to solve this?  Or resources to point me to?

 

Thanks,

Dustin

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Dynamically changing months on a vertical bar chart

hi,@dusdau

     I think what you want to do is create dynamic measures.

use the below video to do it, https://www.youtube.com/watch?v=gYbGNeYD4OY

and here is the Blog for you refer:https://community.powerbi.com/t5/Community-Blog/Dynamically-change-the-information-within-a-visual-v...

 

Best Regards,

Lin

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

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 77 members 1,113 guests
Please welcome our newest community members: