1 Reply Latest reply on Oct 11, 2018 3:57 PM by Patrick Van Der Hyde

    Avoid the junk data when it is not present in data source for all days/months.

    Amit M

      Hi All,


      I have two dimensions [date] and [event label]. For each date i have multiple records in event label field for example 01 January 2018 date has 40 records in event label field.


      Problem - in the data source, in [date] dimension from 1st July 2018  onward we are getting junk values in [event label] dimension and we decided to use June month values for event label dimension whenever user select the date as 1st July 2018 or later, means we need to map 1st june event label values to 1st July, 2nd June event label values to 2nd July and so on.  And if the user select date before the 1st July 2018 then we have to use whatever we are getting from data source in event label dimension.


      I have tried to search the existing threads related to the solution but could not find any, so posting the new thread. I know we could achieve this using the different types of date function,LOD funtions we have in tableau but I am not much familiar with these functions and not sure how to play around with them. 


      trying to explain the conditions below:

      like user selected the date in [date] filter as 01st sept 2018 - 21st sept 2018 [start range- end range] 


      If [date] >= 1st July 2018       [this condition is TRUE as 21st sept 2018> 1st July 2018]

      then   [ we need to use the june month data from 1st  till 21st in event label field, because till June month we had valid data in event label field]

      else   [ use event label field as it is because we have valid data in this field if date is less then 1st july 2018]



      I could not share the actual data because of date confidentiality.  any suggestions would be highly appreciated.



      AMit M  

        • 1. Re: Avoid the junk data when it is not present in data source for all days/months.
          Patrick Van Der Hyde

          Hello Amit,


          is the valid Event data field string related to the day of month and that is what allows you to use it in other months?  if so, why not just use day of month and skip this field all together?   It sounds like you could just create a master table with all days of months and event names and then key off of that as a join across all of your data.  The data source would need to support the join but a blend would work too. 


          Any sample data might help clear up the issue and better allow the community to assist.