You can create a calculated field with this syntax:
IF [ADVANTAGE] > 0
Thanks, but that's not giving me the desired result.
Basically I need a count of the number of markets where the advantage is greater than zero. In my packaged workbook, the calculated field would return 11, as there are 11 markets with an advantage > 0.
I'm then going to create another calculated field to give me the number of markets where the advantage is less than zero. I then want to plot those 2 numbers.
Ah, I see.
You are asking to aggregate the underlying data to the market level, make the assessment of [Advantage], then SUM the results of that assessment... As far as I know, you'd have to use a table calculation (WINDOW_SUM) to get to the Market-level data, since your underlying data exists at a level "below" that.
Then, to further aggregate (count) the number of markets satisfying some measure-based criteria is something I'm not sure how to accomplish with Tableau.
Could you create a secondary data source which aggregates the data to the market level first? That'd make this a breeze using the logic I described before. Otherwise, you'll have to hold out for one of the Tableau superstars to join the conversation.
Sorry I couldn't be more helpful...