3 Replies Latest reply on Dec 15, 2016 4:59 PM by Kristian Wilson

# Calculating 'new' campaigns within a table-

Hello,

I have an table which is refreshed daily from ingested partner reporting which includes:

date

value

name of campaign

I'd like to be able to create a calculation where I'm able to highlight 'new' campaigns, or values that were previously 0 or Null as well as highlight campaigns that have stopped. The output I'm looking to create is a dashboard with data table as well as a list of highlighted 'new campaigns' and 'stopped campaigns' for the month, or week or previous day. I've tried to use a table calculation like this:

if ZN(([Agency Spend]))>0 and LOOKUP(ZN(([Agency Spend])), -1)=0 then "New" else "old" END

This works most of the time, but only then allows me to use the color to highlight the table. Ideally, I'd like to output a list of the campaign names which are 'new' as well as campaigns that have 'stopped' (meaning the spend value has gone back to 0 or null.

I've added a screen shot here: Apologies that I'm not able to upload a packaged workbook. Any advice would be appreciated!

• ###### 1. Re: Calculating 'new' campaigns within a table-

Kristian, I'd like to help. Can you define what the desired output list looks likes. Are you looking for list with just  campaign names and the date they were "new"?

If needed you can screenshot how you want the list to look like

• ###### 2. Re: Calculating 'new' campaigns within a table-

Hi John,

Thanks for the quick reply-

Here's a quick screenshot of a rough example dash of what I'm looking for:

The left table is summary of data for a partner, the tables on the right

are lists of the 'started' or new campaigns, and stopped campaigns for a

time period we define.  What defines start/stop: example:rev on 9/12=0,

9/13=0, rev on 9/13=\$100. A campaign 'stops' when consistent daily revenue

drops abruptly and /or goes to zero.

The main reason that I have to deduce start/stop of campaigns is that I

don't have that data explicitly, and need to make assumptions from the

patterns of data that we receive.

On Wed, Sep 14, 2016 at 8:42 PM, John Brink <tableaucommunity@tableau.com>

• ###### 3. Re: Calculating 'new' campaigns within a table-

Can anyone help on this topic?