7 Replies Latest reply on Mar 4, 2016 8:12 AM by brandon.pitchford

    Change Date Type - Parameter/Calc Field


      I have seen several posts on this but it appears most are over the past 2 years and Tableau must have been updated or some answers have changed since that post date. I am trying to create a calculated field using a parameter to allow users to change the date from day to week to month to year.


      So my dimension is adjustedDate which is a Date data type and at the Day level. I want my users to be able to change this dimension from day to month, etc...



      Based off of older answers I approached it like this. Created a Parameter



      Then created a calculated field:




      I think my syntax might be wrong on how I am calling the Year, Month, or Date. How would I change the adjustedDate dimension based on my case statement? Also, WEEK isn't recognized in the above context, does anyone know how to call on the week?


      It sorta works, but there is no option to use exact date, so my data is not coming through properly.