1 Reply Latest reply on May 28, 2013 9:28 AM by Dan Huff

# If statement with multiple measures

Hi, I have tables listing the % difference month over month for visits and unique visits.  I'm trying to create a calculated field where for each visit type I can highlight variances greater than 10% green, less than 10% red, and else leave it black.  This is straightforward enough to just for one of my measure values, ie:

if (ZN(SUM([Visits])) - LOOKUP(ZN(SUM([Visits])), -1)) / ABS(LOOKUP(ZN(SUM([Visits])), -1))<-.10

then "red"

elseif (ZN(SUM([Visits])) - LOOKUP(ZN(SUM([Visits])), -1)) / ABS(LOOKUP(ZN(SUM([Visits])), -1))> .1

then "green"

else "black"

end

is there a way to do the same for [Unique Visits] in the same table?

Thanks!

• ###### 1. Re: If statement with multiple measures

Yes. The attached covers the steps one needs to take. The steps outline here should work in both V7 and V8.

There is also a slightly different way to do this in V8 but I still prefer this method as it gives us usable color legends while the quicker method in V8 doesn't necessarily do so.

Hope this helps,

Dan