Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Bar chart starts with wrong month

I have a simple bar chart displaying counts by month. It is filtered by relative dates "is in the next 1 year," but it starts with January instead of October (today). Any suggestions?  
  • Anonymous's avatar
    Anonymous
    6 years ago

    The easiest way to solve is, in your Date table, create a column "Month Year" or something like that that has the Month and the Year.  Then use that field in your bar chart.  

    You'll also need to create a MonthYearSort column that will get the Month Year column sorted properly (use the Sort By Column feature).

     

    Here's the DAX:
    MonthYear = FORMAT('Date'[Date], "MMM yyyy")

    MonthYearSort = FORMAT('Date'[Date], "yyyyMM")

     

    Eric