cancel
Showing results for 
Search instead for 
Did you mean: 

Data Label Missing, How can I create one?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Answers (2)

Answers (2)

Former Member
0 Kudos

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

vitaly_izmaylov
Employee
Employee
0 Kudos

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.