3 Replies Latest reply on Mar 6, 2014 11:07 AM by Santosh Kalvemula

    Comparison of cell data

    Saurav Rout

      Hi All, I am facing a difficulty while creating a report. Below is my sample table data.

       

      itemdate1date2date3date4date5
      item12012232318
      item23445542222
      item38865354
      item4test1test2test2test3test3

       

      If you can see for item 1 for date3 and date4 the value in the cells are same. And same thing applies for other rows too (item4 in date2 and 3). My requirement is if my report see the same data as of last day's data it should give me a custom msg. As example for item1 in date4 cell it should display "no run".

       

      Is this possible by using tableau? Please let me know. Thanks in advance.

        • 1. Re: Comparison of cell data
          Thomas McCullough

          Hi there,

           

          You can create a simple table calculation that will look at the previous number and if it's the same as the current number, return a different result.


          With this data set:

          3.png

          The calculation:

           

          1.png

           

          Then run the calculation along Table Across.

           

          2.png

           

          Granted you may not want to return a string of the ATTR, but the pathway is there with the LOOKUP function.

           

          Hope this helps.

          • 2. Re: Comparison of cell data
            Saurav Rout

            Awesome. This is exactly I was looking for. Thanks a bunch.

            • 3. Re: Comparison of cell data
              Santosh Kalvemula

              Hi Thomas/All,

               

              I've a similar requirement like the above, but instead of numbers i've to compare the date & time fields of each field. I tried the same query changing it to DATE but it is giving me some errors. Could someone help me regarding the same

               

              Please find the data sample that i've below

               

              Date1Date2Date3Date4Date5
              Item13/6/2014 2:113/5/2014 2:073/4/2014 4:563/4/2014 4:563/3/2014 2:03
              Item23/6/2014 3:113/6/2014 3:113/6/2014 3:113/4/2014 6:563/3/2014 22:09
              Item33/6/2014 4:113/5/2014 22:133/5/2014 22:133/4/2014 22:093/3/2014 23:09
              Item43/6/2014 1:113/5/2014 2:073/4/2014 22:093/3/2014 22:093/2/2014 22:02

               

               

              Is that possible to compare the fields with the previous fields & show a customized message like below.

               

              Date1Date2Date3Date4Date5
              Item13/6/2014 2:113/5/2014 2:073/4/2014 4:56No Run3/3/2014 2:03
              Item23/6/2014 3:11No Run No Run3/4/2014 6:563/3/2014 22:09
              Item33/6/2014 4:113/5/2014 22:13No Run3/4/2014 22:093/3/2014 23:09
              Item43/6/2014 1:113/5/2014 2:073/4/2014 22:093/3/2014 22:093/2/2014 22:02

               

              Thanks in advance.