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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare County to State Average

Hello,

I'm trying to add a reference line to a gauge chart which show the state average and allow comparison for the regions selected below the state (country, municipality, zip, etc.). I have attached a sample image.

The problem is I'm a little rusty with set analysis.  I can't keep the static total for a state in any of my calculations - once I select the level below state, the total for state drops as well.  Can anyone help refresh my memory on this?

Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Thanks for your help swuehl.  I just added the State Average to a table in the load script.  Took care of all my issues.

Thanks for your help!

View solution in original post

4 Replies
swuehl
Champion III
Champion III

You probably need to ignore selections in these fields, so maybe like

=avg({<CountryField=, MunicipalityField= ,ZipField= >} Value)

Not applicable
Author

Thanks - that helps refresh my memory.  I tried that but I'm still having the totalling issues - the totals that come back are limited by the lower selections.

swuehl
Champion III
Champion III

Your attached screenshot is not helping much in understanding your issue. Could you post a small sample application?

If you include all fields the user may perform a 'lower selection' in as shown above, the avg should not change. But maybe I am missing something else.

Not applicable
Author

Thanks for your help swuehl.  I just added the State Average to a table in the load script.  Took care of all my issues.

Thanks for your help!