Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating the total of each value from a especific field

Hello everyone,

I am creating a bar chart which displays the percentage of Red and Green from each Area, as you can see below:

Area.JPG

The chart show the total percentage considering all areas, but i need to display the total percentage of each area, so i  divide each count by the total count by Area, like this (instead of using the checkbox "Relative"):

Count (DISTINCT [Status mês]) / Count (DISTINCT TOTAL <Area> [Status mês])

And than, the chart displays the total of Red and total of Green by area:

Area.JPG

But something is wrong with the expression. The field "Recrutamento e Sel..." has 5 green values and 1 red value.

So, it was supposed to display 83,3% Green and 16,7% Red.

Someone see why my expression is not working?

Regards

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

You need to either provide sample data or sample file.. Without that it is difficult to guess..

Or you can try removing DISTINCT words from Numerator and Denominator both..

View solution in original post

2 Replies
MK_QSL
MVP
MVP

You need to either provide sample data or sample file.. Without that it is difficult to guess..

Or you can try removing DISTINCT words from Numerator and Denominator both..

Not applicable
Author

Thank you Manish, the DISTINCT was wrong. removing it calculated right.