2 Replies Latest reply on Feb 7, 2018 2:18 AM by Ruchika R

    Date Filter Format

    Cihangir Özçelik

      Hi,

       

      I am using Tableau 10.3 and want to show filter like format as  '2018 6.Week (05.02.2018-11.02.2018)'

       

      Can you suggest any option for get it?

       

      Capture.JPG

       

      Best Regards,

        • 1. Re: Date Filter Format
          Emre Mustafa GÖKCAN

          Hi Cihangir,

          You can solve by creating 3 calculation fields.

          You can solve it by adding the x calculation(3) filter from the calculated fields.

           

           

          step by step ;

           

          1-) first day of the week = DATE(DATETRUNC('week',[DATEFIELD]))

          2-)last day of the week = DATE(DATEADD('day',-1, DATEADD('week', 1, DATETRUNC('week',[DATEFIELD]))))

          3-)[X CALCULATION] =STR(YEAR([DATEFIELD]))+' '+ STR(DATEPART('week',[DATEFIELD])) +'.week ('+ STR([first day of the week])+ '/'+STR([las day of the week])+')'

          • 2. Re: Date Filter Format
            Ruchika R

            Hi,

             

            Check if this helps.

            Formula -

             

             

            STR(Year(Today()))+' '+STR(DATEPART('day', Today()))

            +'.Week('+

            STR(DATEPART('day',(Datetrunc('week',today())+1)))+'.'+

            STR(DATEPART('month',(Datetrunc('week',today())+1)))+'.'+

            STR(DATEPART('year',Datetrunc('week',today())+1))

            +' - '+

            STR(DATEPART('day',(Datetrunc('week',today())+7)))+'.'+

            STR(DATEPART('month',(Datetrunc('week',today())+7)))+'.'+

            STR(DATEPART('year',Datetrunc('week',today())+7))

            +')'

             

            Regards,

            Ruchika

            2 of 2 people found this helpful