7 Replies Latest reply on Feb 4, 2019 12:30 AM by Dony R Djafar

    Count of No. of Days through the month

    Dony R Djafar

      Hi Tableau Lovers,


      I counted the number of days using this formula:



      No. of Current Days     : "Day (Today ()-1)"

      No. of Days                  : "DATEDIFF ('day', DATETRUNC ('month', [Transaction Date]), DATETRUNC ('month', dateadd ('month', 1, [Transaction Date])))"


      Feb 2019.JPG


      I experienced difficulties when I wanted to filter into the previous month to form a "no of current days = no of days".

      when i filter to the previous month, No. of Current Days is 2.

      Jan 2019.JPG


      Is there a correct way to formulate it when I want to filter to the "previous month" like below?

      Jan 2019 2.JPG


      Thank You,

      Best Regards,