7 Replies Latest reply on Jun 25, 2018 4:37 PM by sunil.sachdeva

    Rolling Up Data for Custom Date Calculations

    Cliff Shaw

      Hi!

       

      I have a custom date measure calculation to align my tableau data with my DB data using a calculation:

       

      c.CMS Date

      IF

      ATTR([c. Saturday] = 0) THEN

      DATE(DATETRUNC('week',min([Date Viewed]))+5)

      ELSE

      DATE(DATETRUNC('week',min([Date Viewed]))+12)

      END

       

      Based on the date of the initial air date of a campaign I group dates to the next nearest Friday. In order to group that following Saturday with the next group I created another c.Saturday calculation so that my weeks basically run from a Friday to Friday.

       

      I have the data group appropriately but now I want to be able to roll up the data. Rather than showing the below as 3 lines of data 49, 28, 13 I'd like to only see the 3/2 = 90. The text measure is a CountD of respondent ID. If I remove the Day(Date Viewed) pill then the data rolls up to the final date as a single line.

       

      Screen Shot 2018-06-19 at 3.10.56 PM.png

       

      Been racking my head on this so any help would be great! Thanks!