4 Replies Latest reply on Aug 8, 2013 10:31 AM by Ben Shirley

# Free-floating annotation of Calculated Field

This seems like a blindngly simple question...I'm almost embarrased that I can't figure it out!

I want to annotate a chart with a Calculated Field.  The Calculated Field is a simple value representing the ratio between a chart range maximum value and a parameter with a single constant value.  In other words, the Calculated Field is a constant and not a range of values.  (In this case, I have "total to date" and "goal" values, and simply want to display simething like, "You're 73% of the way to the goal," or, "You're <Calculated Field> of the way to the goal.")

With Area Annotations, I only have access to parameters, so can't use a Calculated Field..  With Point Annotations, I seem to only have access to items on the Rows and Columns shelves, and since my Calculated Field doesn't live there, I can't use it.  Using a Reference Line is possible, but because the ratio value of my Calculated Field is extremely small comapred to the chart values, and since placement of the Reference Line text is limited, that solution is impractical.

Surely there's some way to create an annotation that's free-floating on the chart (i.e., not attached to a specific point) that includes a Calculated Field, no?

• ###### 1. Re: Free-floating annotation of Calculated Field

Did you work this out?

I am looking for the same thing,

"You have delivered [CALC FILED] this week"

Thanks,

Ben

• ###### 2. Re: Free-floating annotation of Calculated Field

Dan,

I think the answer is "yes, it's possible."  But, as you've noted, there are certain limitations with annotations and other options such as reference lines might have drawbacks.  What this means is that while it is likely possible, there is probably not a single "this is the way to solve the problem" but rather a "this is how you could solve it in your case."  So, to help understand our specific case, would it be possible to provide a packaged workbook (.twbx file)?  You can mock-up data if necessary or mock-up a similar scenario using the Superstore Sales sample data provided with Tableau Desktop.

Regards,

Joshua

• ###### 3. Re: Free-floating annotation of Calculated Field

1) What Joshua said. Without having a better sense of your data, we can't give you an exact answer.

2) I put together some options for putting totals in different locations on the viz, in most of the examples in http://drawingwithnumbers.artisart.org/annotating-a-view-with-a-total/ you could replace the total calc with your particular calculation. However, not knowing what your data is like, your mileage may vary.

Jonathan

• ###### 4. Re: Free-floating annotation of Calculated Field

HI,

My Calc-F is this:

IF[Assets Shipped]>TODAY()-7

AND

[Assets Shipped]<=TODAY()

THEN 1 ELSE 0

END

Assets shipped are just dates (DD/MM/YYYY) so all this does count 1 for every record with in the last 7 days, then its a case of SUM(CALC-F). so i tried writing that in like the "Sum(number of records)" which is already in the annotation, but it returns ALL as a value where as it should be a number (89 as its happens so far this week!)

any help would be amazing!

Ben