avatar image
Former Member

Data Label Missing, How can I create one?

I have a Pie chart that lists Top N with Data labels and Values underneath.

One of the Top N is a collection of values that has no label. It may sound odd, but it is expected. I need to add a generic name ("Unmapped source" as an example)

I've tried 'Insert Text Object' which works, as far as the inserting and me giving it a name. As soon as I click anywhere else on the chart, the text object disappears. I see it on the Report Explorer, on the 'Move BackWard, To Back', it is already in the front.

I would prefer to insert , add, create a new Data Label, but anything so that the specific pie segment which has value but no label, would now get a label, would be fine. I've considered creating a graphic with the text and seeing if inserting that would work.

I am using CR XI

Thanks You,

-= Bruce D. Meyer

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 06, 2016 at 07:43 AM

    Hi Bruce,

    It looks like you have NULL values in the dataset?

    If yes, you should use a formula to convert such NULLs to the label value.

    E.g:

    If isNull({field to be used as label}) OR Trim({field to be used as label}) = '' then
    'Unmapped Source'
    else {field to be used as label}

    Go to the Pie Chart and Change the 'On Change of' to use this formula field.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Abhilash,
      I've been trying to make this work in the formula workshop and it errors with everything I try.
      I copied and pasted your formula, and replaced {field to be used as label' with Country Name.
      Am I missing something inferred that I haven't done?
      The error I get is "The result of selection formula must be a boolean."
      Thanks for your assistance.
      My code is below (name modified for readability)

      -= Bruce

      If isNull({Country Name}) OR Trim({Country Name}) = '' then
      'Unmapped Source'
      else {Country Name}
      
      
      I simplified just to see if the location of parens made a difference:
      
      if isNull ({InboundDeny_RPT_OCT.Source Geo Country Name}) Then 
      'Unmapped Country'
      Else
      {InboundDeny_RPT_OCT.Source Geo Country Name}
      
      
      Same error.
      
  • Dec 02, 2016 at 05:48 PM

    I know it is not the best, but as an option to consider. It is possible to add a new Section after the section with the Chart. Add your text object to the new Section. Then in Section Expert check "Underlay the following Section" for the section with Chart.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 06, 2016 at 01:33 PM

    Both great answers.

    Vitaly, I will remember yours for future similar issues.

    Abhilash since I do indeed have nulls I am marking your reply.

    Thank-you each.

    -= Bruce

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content