Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Working with expressions and percentage

Hello everyone,

I am creating a chart which i would like to display the count of the field "Average Utilization", that is a field with percentage values.

Below is a print screen of the field "Average Utilization":

média.PNG

How can i count the total of the values in percentage?

My database has another field with percentage values, and when the user apply a filter for instance "10%", the chart must display the percentage count of all the values which is 10%.

Anyone could help to solve this ?

Regards,

Rodrigo

11 Replies
sunny_talwar

May be just do a simple count like this -> Count(Average Utilization)?

swuehl
MVP
MVP

Seems like you want to ignore user selections / user filter:

=Count({1} [Average Utilization])

if you also need to ignore dimensions, use the TOTAL qualifier:

=Count({1} TOTAL [Average Utilization])


edit: the percentage would then be calculated like

=Count( [Average Utilization]) / Count({1} [Average Utilization])

sunny_talwar

Seems like it should filter -> Chart must display the percentage count of all values which is 10%

Capture.PNG

sunny_talwar

Hahahaha, I have no idea what is required and what is either of us are proposing .

But, I am sure what you are proposing will be right in the end as always

Not applicable
Author

Thanks Sunny for your answer, i did what you told, and i have the situation below:

acesso.PNG

I forgot to mention that my chart has de dimension Division, splited in 3 distinct values (above).

But when i apply some other filters, the chart always display 100%:


filtro.PNG

sunny_talwar

Have you selected the relative option on the expression tab?

sunny_talwar

Do you want to view count numbers or Count in terms of percentage? I think you should try what Stefan proposed below if you are trying to get percentages

Not applicable
Author

Yes, i have selected  the relative option !

sunny_talwar

May be you are looking for this:

Count(Average Utilization)/Count(TOTAL {1} Average Utilization)


or this:

(Count({<Division>}Average Utilization)/Count(TOTAL {1} Average Utilization)) * Avg(1)

also uncheck the relative option.