Forum Discussion

hyeeun's avatar
hyeeun
Frequent Visitor
8 years ago

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

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity 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

     

     

     

     

    • hyeeun's avatar
      hyeeun
      Frequent Visitor

      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 outputdesired output

      • hyeeun's avatar
        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??