
1. Re: Another desperate plea for table calculation help  churn
Yuriy Fal Mar 31, 2016 9:31 AM (in response to Geoffrey Cleaves)Hi Geoffrey,
Please check addressing for Table Calculations on each view. They should be:
for [Churn Status] > Compute using [Month]
for both [# Customers (Filter)] and [# Customers (Size)] :
inner Calc ( [Churn Status] ) > Compute using [Month]
outer Calc > Compute using [Client ID]
Please find the attached wb with last two views modified.
Hope this could help.
Yours,
Yuri

tablecalc_help_YF.twbx 165.1 KB


2. Re: Another desperate plea for table calculation help  churn
Geoffrey Cleaves Mar 31, 2016 9:45 AM (in response to Yuriy Fal)Thanks Yuri,
Indeed your version fixes things up. I didn't even know that table calculations within table calculations could be addressed differently.
I must say your method for counting the size of the bucket, using ranks, is "weird" and hard to grasp. (I say that in ignorance , I'm not complaining!). I wonder if anybody has a simpler method for a simple person like me.
Cheers!
Geoff

3. Re: Another desperate plea for table calculation help  churn
Yuriy Fal Mar 31, 2016 10:06 AM (in response to Geoffrey Cleaves)1 of 1 people found this helpfulHi Geoff,
Sizing (and numbering) buckets (which are Table Calcs in this case)
using RANK functions (because they are Table Calcs, too  that's why)
is the most elegant (though not obvious) approach in Tableau,
thanks fellow Zen Masters Joe Mako and Jonathan Drummey.
For the thorough explanation, please refer to this blog article by Alexander Mou :
Vizible Difference: Histogram via Rank Functions
Yours,
Yuri

4. Re: Another desperate plea for table calculation help  churn
Geoffrey Cleaves Apr 1, 2016 1:51 AM (in response to Yuriy Fal)Thanks for additional resources. Indeed RANK seems more elegant than the brute force alternatives. Now if we could only sort the histogram colors in a consistent way it would be wonderful. At the moment the bar is sorted by customer id which is erratic.

5. Re: Another desperate plea for table calculation help  churn
Yuriy Fal Apr 1, 2016 10:53 AM (in response to Geoffrey Cleaves)Hi Geoff,
Unfortunately, sorting a Dimension based on a Table Calculation is not possible.
One could sort Marks on a view using a Table Calc as a Discrete (Blue Pill),
but one should have this Pill on a view  either on Rows or on Columns.
Yours,
Yuri
PS That's why I built Cohort calculated fields as Dimensions using LOD calcs.

6. Re: Another desperate plea for table calculation help  churn
Yuriy Fal Apr 9, 2016 5:24 PM (in response to Yuriy Fal)Hi Geoff,
Thinking further about how stacked Marks could be sorted,
I came up with an unelegant (aka bruteforce) approach.
Call it "unelegant" because Tableau is forced to behave
like any other ordinary "cursornloop" programming language.
It's a corner case that doesn't fit nicely into a setbased paradigm of Tableau.
The main idea is to mimic Stacked bar Marks with Gantt ones.
The latter could be precisely positioned on a view using nested Table Calcs.
Please find the attached wb.
Hope it is of help.
Yours,
Yuri

tablecalc_help_sorted_YF_9.2.twbx 184.3 KB


7. Re: Another desperate plea for table calculation help  churn
Geoffrey Cleaves Apr 11, 2016 10:21 AM (in response to Yuriy Fal)