Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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!

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
MVP
MVP

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
MVP
MVP

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!