1 of 1 people found this helpful
Not sure how you want the presentation to be but this could be one approach.
The Odds Ratio Calc for the example below is:
//compute using table across.
If you'd prefer Odds Ratio be a third column it can be done with custom SQL (or possibly other ways). I can add the steps if you'd like but it's a little hacky IMO
Boy, thank you for posting this Aaron. I lost my sanity a little trying to work on this yesterday--I knew there was a simple solution, but for whatever reason, couldn't remember the LOOKUP function. Helped me learn/review, so thanks again!
lol thanks Matt, glad to help, although I had more fun figuring out my second solution.
Can you post your workbook? I wouldn't mind taking a look at your work.
Looks pretty clever to me. Thanks for sharing!
Thanks, Aaron! That is very helpful. Combined with this video, Aggregate Calculations | Tableau Software, I was able to figure out everything I wanted to do (so far, anyway).
Using your Odds Ratio calculation as an example of how to manipulate aggregated calculations, I have managed to create a calculated field which measures the statistical significance of two the difference between two proportions (using the two-proportion Z-test). I am working on a chart where I can create sub-groups of students who are taking certain classes, and test whether or not their outcomes are statistically different.
Ok, I spoke a bit too soon. While I've got some of the functionality I need, I don't have all of it. In the updated workbook, the 'Table' sheet has the table of a bunch of values I've calculated for each Region. In 'Plot1' I make a simple plot of the Odds Ratio and everything looks fine. The Odds Ratio is correct (in the 'Technology' column anyway) and I can color the regions by their Odds Ratio value (using Odds Ratio 2, which selects the 'Technology' value for both).
But things break in 'Plot2', which is closer to the final product I want to make. The Odds Ratio is no longer correct. I (sort of) understand why it's breaking, since the Department_Technology field is no longer in the Columns. But I need to be able to manipulate the plots without my calculations breaking. Any more thoughts?