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
hyeeun
Frequent Visitor

Display same month previous years on x axis based on filtered value

I have a report page with a Year-Month slicer. I want my column chart of to automatically show the same months previous years on x axis. For example, when 2018-05 is selected from my slicer, the chart would rearrange to show 2016-05,2017-05 and 2018-05 on its axis. Right now my chart only displays the selected year-month. I hope my question makes sense. Any help or tip would be much appreciated!!

 

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

Hi hyeeun,

 

You can create a calculate column using DAX formula as below and create a slicer chart based on the new column:

 

Month Column =
MONTH ( Table[Date] )

Then you can use the slicer to filter the chart you have created.

 

Hope it's helpful to you.

 

Jimmy Tao

 

 

 

 

Thanks for your comment Jimmy but I don't think my question was clear.. The month I'm refering to is already in DAX and have a slicer. I am trying to have my column chart to show same month previous years as shown on the image below(on the right) but my slicer is limiting it to only show the value like the image on the left b/c "2018-05" is selected from the filter. 

 current outputcurrent outputdesired outputdesired output

hyeeun
Frequent Visitor

The only way I can get this to work is creating two slicers; one for Month and one for Year and turning off the filter interactivity from the Year slicer to the chart so it only reposponds to Month slicer. This however messes up with another visual I created which is a percent change calculation from the previous month. There must be more sophisticated way of achieving this. Anyone??

Hi hyeeun,

 

Could you please provide your demo pbix file for further test?

 

Regards,

Jimmy Tao

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.