11 Replies Latest reply on Apr 15, 2016 8:30 AM by David Milmont

# Highlighting rows

Hi,

I was able to create this calculated field to highlight rows that meet the specific criteria.

IF [Cost / Response] <=26.22 AND [Campaign Category] = "product webinar" AND [Weighted Influenced ROI \$:\$] > 0 THEN "Yellow" ELSEIF [Cost / Response] <= 245.40 AND [Campaign Category] = "external email" AND [Weighted Influenced ROI \$:\$] > 0 THEN "yellow" ELSEIF [Cost / Response] <= 36.57 AND [Campaign Category] = "education webinar" AND [Weighted Influenced ROI \$:\$] > 0 THEN "yellow" ELSEIF [Cost / Response] <=134.15 AND [Campaign Category] = "tradeshow" AND [Weighted Influenced ROI \$:\$] > 0 THEN "yellow" END

Once I created this calculated field, I converted it to a measure, put it on color and size and was able to get highlighted rows that met my criteria.

Now I need to replicate that on a different workbook with different criteria and it's not working. On the attached workbook, I'm trying to highlight rows where campaign target market = corporate, campaign category = advertisement, MQL >=23 and SQL >=6. This is just one example, I'll need add more criteria, like changing the target market and the campaign category.

Why can't I get this to work?

• ###### 1. Re: Highlighting rows

Hi Lindsay;

I didn't see several of the fields you used in your formula present in your attachment, namely:

• [Cost / Response]
• [Weighted Influenced ROI \$:\$]

Am I overlooking something?

--Michael

• ###### 2. Re: Highlighting rows

Sorry, my question was a little confusing. The formula I posted is an example of a formula I used in the past to highlight rows. I tried to re-create it using the fields, target market = corporate, campaign category = advertisement, MQL >=23 and SQL >=6 and it won't work.

• ###### 3. Re: Highlighting rows

I wasn't able to find the fields you were talking about either however the logic would work like this:

```IF [Campaign Target Market] = 'corporate' AND [Campaign Category] = 'advertisement'
AND [MQL] >= 23 AND [SQL] >= 6 THEN 'YELLOW'
END
```

You could then drop this on color and have it highlight if all that criteria was met.

• ###### 4. Re: Highlighting rows

Thank you. So what do I do next? It adds that calculated field as a dimension. How do I get the row to highlight?

• ###### 5. Re: Highlighting rows

You will then drag the calculated field over the "Color" Mark. I circled that in red on this screenshot on the left hand side. I added some additional logic to show how to works to highlight rows. You can see it circled in red on the right side of the screen shot.

The new logic I used for the calculated field "Campaign Target Marketing Highlight"

• ###### 6. Re: Highlighting rows

Hi,

I did as you instructed and the row still did not highlight. If you look at the attachment "leads by campaigns for highlight tableau questions" and look at the tab "Corporate 1" you'll see that I added the formula. The top two rows in the Advertisement section should be highlighted.

I want it to be a solid yellow bar like the report below (however this is a different report, but just an example of the highlighting):

• ###### 7. Re: Highlighting rows

There were a few modifications that needed to be made. Sorry if I was unclear. You were almost there. I would attach the worksheet but I have a newer version of tableau than yours and you wouldn't be able to open it again. Let me know if you need further help.

The issue was that we were not aggregating the measures while being evaluated in the IF statement.

1 of 1 people found this helpful
• ###### 8. Re: Highlighting rows

I'm so close! If you look again at the "Corporate 1" tab you'll see my work. I updated the formula as your suggested, but it seems to be highlighting things that don't meet the criteria of the formula. And also there's a dot next to the ones not highlighted.

• ###### 9. Re: Highlighting rows

I took a look at your worksheet and I think you have everything right. The reason rows are being highlighted that shouldn't be is the size of your marks. This is also why there are small blue dots, these are just really small marks being places to each value. I think your idea was to use the symbols to fill in the rows as a way to highlight everything. Which is a great idea, however it may need some experimenting to get right. Perhaps making a custom symbol?

If it were me I would explain to your end users that tableau makes it easiest to just highlight the text, rather than filling in the background of the cell.

• ###### 10. Re: Highlighting rows

Thank you so much for your help with this!