5 Replies Latest reply on May 31, 2012 10:03 AM by Jonathan Drummey

    Date level text not working

    Emily Mueller

      http://community.tableau.com/thread/112972

       

      Hello- I am using paramaters and calculations based on the above thread link.  However, I am not having the same results with my "Selected Over Text".  Maybe someone can tell me what I am doing wrong.  I have attached the workbook so you can take a look.

       

      1) I am getting a "Null" result for every paramater choice I choose.

      2) If I have Min(Date) on the Rows shelf, My "Compared to" - Year Ago doesn't work correctly.  It calculates to the previous.

      3) If I have Min(Date) on the level of detail shelf, My "Date Level"- Year doesn't seem to work at all.

       

      Does anyone see what I am missing?  Thanks in advance for any help!

       

      Emily

        • 1. Re: Date level text not working
          Jonathan Drummey

          Hi Emily,

           

          Did you ever get this working?

           

          Jonathan

          • 2. Re: Date level text not working
            Emily Mueller

            No, I still haven't figured this out.  I think it has something to do with my "Selected over Text" and how it is being computed as a table calculation, but I can't figure out how to fix it.

            • 3. Re: Date level text not working
              Jonathan Drummey

              Hi Emily,

               

              See the attached, I'll leave validating the numbers to you, at a cursory glance it seems correct. I've attached a revised workbook, and here's what I found:

               

              The calculations were coming up with incorrect results because the Compute Using was not set correctly. All three calcs (Selected Over Text, Compared to weight, and Difference in weight) use the same Compute Using settings, which is a nested Compute Using where Year Ago Weight is set to Compute Using Year, and Previous Weight has an Advanced Compute using of Year/Date Level ordered along Date/Minimum/Ascending. I've included screenshots for each:

               

              screenshot1.jpg

              screenshot2.jpg

               

              This should get you the desired results. With table calculations, the ordering of the fields on the right side of the Advanced dialog and all the other settings are critical to getting the desired output, and it can be easy to forget to update something when you are dragging and dropping pills in the view.

               

              The Null results are coming because the Selected Over Text field depends on a LOOKUP of the prior value, and when you are at the earliest value(s) there are no prior values and the LOOKUP is either returning Null or something that is ultimately interpreted as Null in the calculations. The original view that you worked from does not show any Null results, and I can't figure out exactly why, I suspect this might have something to do with the fact that the original is using pasted text and you are using an Extract. In any case, you can get rid of the Null values by dragging the Selected Over Text to the Filters shell and de-selecting Null. (It's good practice to do this *after* you've gotten the Compute Using settings right, so that way you only have to set them once).

               

              Also you can now create the MIN(Date) field, drag that to the left side of the Rows window, and uncheck Show Header to create a sort on date.

               

              Finally, the Selected Over Text when the Select Date Level parameter is set to Week is not returning the expected text results. This is due to how Tableau's STR() and DATE() functions work differently on extracts vs. text files, see this thread from the last couple of days for details on what you can do:

              http://community.tableau.com/thread/118065

               

              Let me know if this helps!

               

              Jonathan

              • 4. Re: Date level text not working
                Emily Mueller

                Jonathan-

                 

                Thank you so much!  This is exactly what I was missing! Thank you for the screenshots, that helped. 

                 

                I still haven't figured out the week text, but that is something I can continue to work on.

                 

                I appreciate you looking at this and helping me!

                 

                Emily

                • 5. Re: Date level text not working
                  Jonathan Drummey

                  You're welcome!