What you need is the "Viz in a viz/tooltip" feature that they demonstrated at a Tableau convention but have not released yet.
1 of 1 people found this helpful
So yes when we have Viz in ToolTip this will become a whole lot easier!!
Until that time we need to get a little creative!!...so in order to get the SubCats to list in the tooltip we are going to need SubCat in the VizLoD. However we can use Table Calculations in order that we only plot a single bar per SubCat...
So in the attached, I've done it 2 ways to show you what's going on....
First I created a table calc version of Average Sales, and use the IF FIRST()=0 (what this does is only return a result for the 1st mark, else NULL [as we don't have an ELSE part]. We make the Table Calc so it returns the same result for each SubCat (the average of all of them) so it doesn't matter which one we plot).
So I created
[Average Sales - Table Calc]
IF FIRST()=0 THEN WINDOW_AVG(AVG([Sales])) END
I bring this on as my Axis, and set the compute-using to "SubCat"...
Now this isn't quite right here...as this is actually taking the Average of each SubCat, and then taking the Average of these (if you look at the 'Target Numbers - No SubCat in VizLoD' tab, I've removed SubCat so we know what numbers we should get)...
So I need to adapt this to calculate the Average (manually)!
So instead I've used
[Average Sales - Table Calc v2]
IF FIRST()=0 THEN WINDOW_SUM(SUM([Sales]))/WINDOW_SUM(SUM([Number of Records])) END
where I'm creating the average at the level we want...again bring this in and set compute-using to SubCat and voila!
hope that is what you were after, and makes sense, but let me know if not
Ahh I didn't think of using table calcs to manipulate the average! Thank you; this helps a bunch!!