Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a bar chart and in the legend I want to include a sum in () to the right of the text labels.
When I have text followed by many sums, I get a null
When I have text followed by one sum, I get the desired text and sum
When I have many sums and no text, I get the desired total sum
This gives the null but I want a text and sum:
='Text '&SUM(field1+field2)
This gives text and a sum:
='Text '&SUM(field1)
This gives a sum:
=SUM(field1+field2)
Everything else is fine, for instance the bars in the bar graphs sum their fields okay, and I have sort descending based on a sum expression, just the label of the expression where I am incorporating a piece of text with the sums is fighting me.
Thanks!
PS> I tried summing in the script, but it's alot of concatenate loads and maybe the group by stuff has trouble- it looked like it ignored the fields I created with the sums and didn't error either. I only need this particular expression for a couple of labels in one graph though, so should be fine if I can get it into the one graph.
you can try:
='text' & rangesum(sum([field1]), sum([field2]))
If this don't work, could you provide a sample qvw that demonstrates your problem?
Hope this helps!
This one ignores me and gives a null too:
='text '&SUM([field1])+SUM([field2])
I'll try some numsums and such while I wait here, but everything looks like it populates okay without that elsewhere.
you can try:
='text' & rangesum(sum([field1]), sum([field2]))
If this don't work, could you provide a sample qvw that demonstrates your problem?
Hope this helps!
Hi Steve,
Have you tried adding a new expression and changing its display option to "values on data points" only?
rangesum nailed it, thanks!
Label is this:
='Email Aging Total ('&
Rangesum(
SUM([Email Aging Open]),
SUM([Email Aging In Progress]),
SUM([Email Aging Waiting on User]),
SUM([Email Aging Waiting on External]),
SUM([Email Aging Waiting on Internal]),
SUM([Email Aging Waiting on Tier 2]),
SUM([Email Aging Waiting on Director])
)
&')'
which looks like this on the legend: Email Aging Total (21)
Thanks again!
PS> This is the expression used for the bar itself. I just had to replace the + with , and wrap it with the rangesum() when building it into the label.
=SUM([Email Aging Open])+
SUM([Email Aging In Progress])+
SUM([Email Aging Waiting on User])+
SUM([Email Aging Waiting on External])+
SUM([Email Aging Waiting on Internal])+
SUM([Email Aging Waiting on Tier 2])+
SUM([Email Aging Waiting on Director])
(I've found the legend is a nice place to put numbers if there's a lot happening or any small segments in the main part of the charts.)