Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Combined chart with non chronological X axis

Hi everybody. I need Your help with combined chart. Bar chart presents number of customers, line chart presents sales. On X axis I have dates arranged chronologically (Jan 2019, Feb 2019, March 2019...
  • v-deddai1-msft's avatar
    v-deddai1-msft
    5 years ago

    Hi Anonymous ,

     

    You can create a date table in your data model like:

     

    Table = ADDCOLUMNS(CALENDAR(DATE(2019,1,1),DATE(2021,12,31)),"monthYear",FORMAT([Date],"mmm")&YEAR([Date]),"sortvalue",MONTH([Date])+YEAR([Date])/10000)

     

    Then sort the monthyear column by sortvalue column:

     

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

     

    Best Regards,

    Dedmon Dai