Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pie chart with number and percent

Hi

I have 2 fields namely _Chart1Expression3 and _Chart1Expression2 that correspond to the metric in integer (Million scaling) and percent format.

I would like to display both of them in the pie chart using the technique below, however the Chart Legend only displays the numeric portion of the Show Numbers in Legend and not the Text Representation. Is there something I am missing?

dual($($(=_Chart1Expression3)) & ' M / ' & $($(=_Chart1Expression2)), $($(=_Chart1Expression3)))

_Chart1Expression3 = Num(SUM(Metric)/1000000, '#,##0')

_Chart1Expression2 = Num(SUM(Metric)/SUM(Total Metric), '#,##0%')

19 Replies
MK_QSL
MVP
MVP

Can you load your sample file?

Not applicable
Author

here you go, in the second chart i would like to see the number and percent as in when you hover over the pie slice

MK_QSL
MVP
MVP

Like this?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add the expression:

NUM(SUM(Expression1)/SUM(Total Expression1), '#,##0%') & ' / ' & Num(SUM(Expression1), '#,##0')

as a second expression and select "Text as Popup".

-Rob

http://masterssummit.com

Nicole-Smith

Have a look at the attached .qvw

Mine is a bit different from Rob Wunderlich's as I use the relative check-box to calculate the percentage.

Not applicable
Author

I am not looking so much so for the text as popup which I have working already using the Dual but rather looking to fix the legend where the Number and Percent i.e. text representation of the popup is not showing.

I would have expected the Text representation of my expression to show in the legend since by default that is the display value for any dual for eg. in Month, Jan = 1 but we see Jan in display. My legend is incorrectly showing the unformatted SUM(Expression1) instead of 'percent / number'

hope this helps clarify the dilemma

it might just be a bug with 11.2SR5

aveeeeeee7en
Specialist III
Specialist III

Dear Amir

See the Attached Qvw of Pie Chart.

It has different Scenarios.

Hope it works fine for you.

Regards

Aviral Nag

Not applicable
Author

Your solution on top right is exactly the problem I trying to solve. The legend is not displaying the text value. Also, showing the dimensions in the pie chart are not the ideal solution since my legend is verbose unfortunately and therefore having a separate legend on the right is better

MK_QSL
MVP
MVP

There are three correct solution given.