Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

sort date in slicer

hi all any idea how i can sort the date , so that the lastest month is on the top? Thanks so much.  
  • az38's avatar
    az38
    6 years ago

    Anonymous you didnt do sort by column.

    click left mouse on your YYYYMM column in the Fields Pane (right part of powerbi window) 

    then find and press button Sort by Column and choose YYYYMMdigits

    do not hesitate to give a kudo to useful posts and mark solutions as solution

    LinkedIn

  • az38's avatar
    az38
    6 years ago

    Hi Anonymous 

    your column [Calendar Month Number] stores month number without leading 0.

    to fix it you should either change format this field or rewrite column like this

    yyyymmdigit = if('Date'[Calendar Month Number]<10;CONCATENATE('Date'[Calendar Year];concatenate("0";'Date'[Calendar Month Number]));CONCATENATE('Date'[Calendar Year];'Date'[Calendar Month Number]))

    do not hesitate to give a kudo to useful posts and mark solutions as solution