Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaveshp90
Creator III
Creator III

How to show Count and Percentage on the Pie chart visual ?

Hello,

I have the below Pie Chart which shows the No of Projects per Category;

Capture.PNG

When I uncheck the relative under my expression I am getting the count of the projects as shown below;

12.PNG

How Can I get both percentages and count of the projects in my Pie chart visual? any help is greatly appreciated.

thanks

Bhavesh

1 Solution

Accepted Solutions
jensmunnichs
Creator III
Creator III

Couple of answers that work here, I find the easiest option to be to simply add a second expression with the exact same expression (for example Count(Project)), and tick relative for one of the expressions and leave it off for the other. Check Value on data points for both and you should have what you want. Example:

You won't be able to see the percentage in the legend though, you'll have to use Nassim's solution for that.

View solution in original post

5 Replies
dplr-rn
Partner - Master III
Partner - Master III

You need to use dual function.

something like

dual( your_sum_expression & '  - ' & your_percent_expression,your_sum_expression)

something like

dual(Num(Sum(Sales),'0,000.00') & '-' & num((Sum(Sales)/Sum(TOTAL Sales))*100,'0.00') & '%',

Num(Sum(Sales),'0,000.00'))

qolkaram
Contributor III
Contributor III

Hi,

just add a calculated dimension  as

=Category&' : '& aggr(num(sum(#Projects)/sum(total{<Category>} #Projects),'#,##0.00%'),Category)

and the expression is :

sum(#Projects)

and don't select relative check box .

thanks

nassim

jensmunnichs
Creator III
Creator III

Couple of answers that work here, I find the easiest option to be to simply add a second expression with the exact same expression (for example Count(Project)), and tick relative for one of the expressions and leave it off for the other. Check Value on data points for both and you should have what you want. Example:

You won't be able to see the percentage in the legend though, you'll have to use Nassim's solution for that.

bhaveshp90
Creator III
Creator III
Author

That was the easiest thing to do. thank you 

samuelll
Contributor
Contributor

can this be expanded to a second dimension? so not just "category", but say, "category" and "projectowner" where project owner could be a list of names