3 Replies Latest reply on Jul 23, 2012 7:50 AM by barry.danielson

    automating standard mark annotations

      Is there an easy way to create a calculated field to be used for labels that includes 2 of the data points available when creating a mark annotation manually?  (i.e. Average Score and Count of Distinct Record IDs)

        • 1. Re: automating standard mark annotations
          Tracy Rodgers

          Hi Barry,

           

          I'm not sure I understand exactly what you mean. Do you mean you want to see the data for two separate points in the same annotation box?

           

          -Tracy

          • 2. Re: automating standard mark annotations

            I want the labels to include 2 pieces of data to describe the point.  Placing a value in the label field in the Marks card only provides 1 piece of data (i.e. average response).  I would like to include 2 pieces of data in the label - the average response AND the number of responses.  I can accomplish this using mark annotations, but I have to complete the annotations separately for every bar - requiring a lot of manual effort - vs. using the Label field to accomplish the same thing somehow.  Let me know if that makes more sense.

             

            9.60

             

            vs

             

               9.60

            (n=1,142)

            • 3. Re: automating standard mark annotations

              I figured out how to create the calculated field for the situation originally described above. I used strings to be able to display two data points in the same field and had to use ROUND and LEFT to manipulate the displayed number into only showing 2 decimal places.

               

              LEFT(STR(round((AVG([Response])),2)),4)

              +"

              n= "

              + STR(COUNTD([Registration ID]))

               

              My next issue is I need to create a second calculated field to be used for labels with similar information (a percentage of the total number of records in place of average response, along with the count of distinct registration IDs - i.e. 86% and 2017 in the table below).  I can create a table that provides the data points I want to include in my calculated table, but don't know how to write the calculated field to use for my data labels.  I only want to display the % and counts for the "Yes" responses

               

              Question

              Count of Distinct Registration IDs

              as a percent of total responses

              Count of Distinct Registration IDs

              where Response = Yes

              (total responses =2342)

              Question 186%2017
              Question 243%1003
              Question 354%1271