Forum Discussion

ironboy0418's avatar
ironboy0418
Icon for Helper II rankHelper II
3 years ago

How to set a default sorting for a chart?

I do have two slicers that are inter-dependent with each other:

 

 

The objective is whichever I select weekly, monthly, or quarterly in the relative slicer. The below report will be sort not by its values rather by its relative date like the example below. The concern with this is that I always manually sort it everytime I select another view:

 

 

Is there a way we can sort it automatically using dax? or any other method?

 

Thanks in advance.

 

 

 

 

 

4 Replies

  • Hi ironboy0418 ,

    Click on your field (Year-month which you have put on you X-Axis)

    Then from the upper ribbon in the "Column Tools" select the "Sort By Column" section and sort it by the column YearMonth (if you do not have YearMonth Field you can Create it as a calculated column in your datetable as below):

     

     

    CONVERT(FORMAT(DateTable[Date],"YYYYMM"),INTEGER)

     

     

     

    If this answer solves your problem, give it a thumbs up and accept it as a solution so the others would find what they need easier.

    Regards,

    Loran