Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pie Chart Based on Threshold

Hello -

I am trying to create a pie chart that shows the number of rows that are within a chosen range versus the numbers of rows that are outside of the range. I would like the user to be able to input two numbers into the Amount Input Box, have them choose if they want to look at everything below, above or equal to the first number or if they want to look at everything in the range. The pie chart should then update accordingly with what is in/out of the threshold they selected. What's the best way to do this? Ideally, I would like them to input the numbers, make a selection and be able to click either on "Within Threshold" or "Out of Threshold" to filter down to the rows of interest. Right now, I am only able to get the input box working with the chart. My pie chart expressions are:


Out of Threshold; SUM((IF(ROUND(PremiumAmount)>= Var_WPDiff_Wp1 and ROUND([PremiumAmount])<= Var_WPDiff_Wp2, '0','1')))

Within Threshold: SUM([PolicyNumber])-SUM((IF(ROUND([PremiumAmount])>= Var_WPDiff_Wp1 and ROUND([PremiumAmount])<= Var_WPDiff_Wp2, '0','1')))

I'm open to any ideas and suggestions you have to make this work.

Thanks!

Threshold.PNG

4 Replies
sunny_talwar

I am thinking of an Island Table field as dimension, since you mentioned the ability to make selection and pick function to set the expression which would include if/set analysis to restrict each of the two expressions. I guess it would be easier if you can share a sample with us

Not applicable
Author

Here's a sample of where I am at. Any help would be much appreciated!

sunny_talwar

I apologize for not getting back early, but it seems that I mis-read the requirement and now I am unable to achieve what you are looking for. But may be swuehl‌ can take a look.

Best,

Sunny

swuehl
MVP
MVP

Not 100% sure if this is what you've requested, but here is a pie chart you can select your categories in.