
1. Re: How do I construct a "where/if" calculation?
Alex Kerin May 3, 2012 6:13 AM (in response to lewis.manley)The shape of your data makes this more difficult than normal (the fact that rent and sale are in the same column).
Attached is a way to do this  be aware the way the table calculation is set up means that if you move columns/draw a chart you will have to correct the partitioning. At the moment the calculation simply looks at the next row down which happens to be the sale data. It does this calculation within each pane.

YieldTest AK.twbx.zip 32.3 KB


2. Re: How do I construct a "where/if" calculation?
Alex Kerin May 3, 2012 6:17 AM (in response to Alex Kerin)Okay, couldn't leave it like that  here's another with the partitioning explicitly set  now it's pretty easy to draw a chart...
EDIT: And [Average Rent] should actually be [Yield]

3. Re: How do I construct a "where/if" calculation?
lewis.manley May 4, 2012 3:10 AM (in response to Alex Kerin)Thank you Alex that seems to work perfectly. However please excuse my lack of knowhow but how did you set the "partitioning explicitly"?

4. Re: How do I construct a "where/if" calculation?
Alex Kerin May 4, 2012 5:34 AM (in response to lewis.manley)1 of 1 people found this helpfulWhen you drag a table calculation into the view, Tableau makes some assumption about how you want the partitioning/addressing to run (http://onlinehelp.tableausoftware.com/v7.0/pro/online/enus/calculations_tablecalculations_understanding_addressing.html). Often you can make the calc work straight away, or with a quick tweak. The issue is that if you change the sort, the arrangement of pills, or add new pills you can mess it up. I told Tableau to always do it the same way, regardless of these things.

5. Re: How do I construct a "where/if" calculation?
lewis.manley May 8, 2012 5:18 AM (in response to Alex Kerin)Thanks Alex