3 Replies Latest reply on May 17, 2012 6:18 PM by soniajaswal

    Custom Display

      Hello,

       

      I am stuck with an issue and can't proceed unless it's fixed.

       

      Below is an example of my data:

       

      NameZoneSales
      AZone 11200
      Zone 43000
      BZone 42000
      CZone 24000

       

      Below is how i want it to show in Tableau:

       

      NameZoneSales
      AZone 1 + Zone 44200
      BZone 42000
      CZone 24000

       

      'A' falls in both Zone 1 and Zone 4. How do i put it up in a format i stated above?

       

      Thanks so much!

      Sonia

        • 1. Re: Custom Display

          Any Ideas on this please?

           

          Sonia

          • 2. Re: Custom Display
            Dennis Schoder

            Hello Sonia,

             

            You could try the following formulas when there are 2 zone records per name:

             

            Formula to merge the zones:

            if window_count(attr([Zone])) < 2

                then attr([Zone])

            else

                lookup(attr([Zone]), -1) + ', ' + attr([Zone])

            end

             

            Formula to merge the accompanying sales:

            if window_count(sum([Sales])) < 2

                then sum([Sales])

            else

                lookup(sum([Sales]), -1) + sum([Sales])

            end

             

            Then put 'Name' and the zone merge formula on rows, and the sales merge formula in text. Put 'Zone' in level of detail. In the two formulas, go to compute using and select 'Zone' in there. As a last step apply the zone merge formula as a filter, and exclude the 'Null' in there. This should deliver the desired result.

             

            Maybe that helps,

            Dennis

            • 3. Re: Custom Display

              Hey Thank you!

               

              The below calculation helped me better coz i have a huge data worksheet:

               

              if Countd([Zone])>=2

              then "Zone 1 + Zone 2"

              else attr([Zone])

              end

               

              Was able to figure out later.

               

              Thanks so much again!

              Sonia