Forum Discussion

Prima_'s avatar
Prima_
Resolver I
3 years ago
Solved

Avoid duplicates in date slicer

Hi,

 

How to have distinct values in the date slicer?

 

 

Thanks.

 

 

 

  • Prima_ , Create a new column; format will not do in this case 

     

    month Year = format([Date], "mmm YYYY")

  • Prima_'s avatar
    Prima_
    3 years ago

    Thanks Rico Zhou, but, that's not what I want.  I tried creating a new column as suggested by amitchandak, but, it worked only after changing the format as shown below. Thanke amitchandak.

     

     

     

3 Replies

  • Prima_ , Create a new column; format will not do in this case 

     

    month Year = format([Date], "mmm YYYY")

    • Prima_'s avatar
      Prima_
      Resolver I

      Thanks Rico Zhou, but, that's not what I want.  I tried creating a new column as suggested by amitchandak, but, it worked only after changing the format as shown below. Thanke amitchandak.

       

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Prima_ ,

     

    Your issue should caused by the custom format of your [Date] column. Format "MMM YYYY" will cause your date value return month short name + year like "Jan 2022'.
    So whether your value is 2022/01/01 or 2022/01/02, they will return "Jan 2022".


    If you want to avoid duplicates as above, please add day in your format. Format like "DD MMM YYYY".

     

    Best Regards,
    Rico Zhou

     

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