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:

 Name Zone Sales A Zone 1 1200 Zone 4 3000 B Zone 4 2000 C Zone 2 4000

Below is how i want it to show in Tableau:

 Name Zone Sales A Zone 1 + Zone 4 4200 B Zone 4 2000 C Zone 2 4000

'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

Sonia

• ###### 2. Re: Custom Display

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