Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
smusayev
New Contributor II

Set a limit/filter to gauge meter

Hi,

I am need of help.

I have a gauge that calculates the percentage rate of compliance.

In my AccountCompliant Column I have 'Yes' or 'No' as my rows.

The measure calculates where compliance is Yes/Total AccountCompliance,

i.e 70/100  = 70 %

My measure in Qlik Sence is as follows.

Count({<AccountCompliant = {'Yes'}>} AccountCompliant) /Count(Total <AccountCompliant> AccountCompliant)

Questions 1.  Is the above correct syntax or is there a better way of calculating my compliance rate?

I also have a table with various departments.  When I select a specific department, the gauge meter will return the compliance rate for that department (which is good).

However what I am trying to do is to have another gauge meter set to a specific department, so I can compare the specific department versus the overall compliance rate on the screen.

Basically have the 1st gauge meters for overall department and the 2nd for a specific department,  and I really would like that when I select a different department it would only modify the 1st gauge meter and leave the 2nd set to only the specific department.

Question 2.  Is the above possible if so, can you please help

(also I really would like not to use the bookmark feature if possible, and currently I cant import any extensions into Qliksense). 

Thank you,

1 Solution

Accepted Solutions
okolyug16
Contributor II

Re: Set a limit/filter to gauge meter

try excluding the field by adding Dept= to your set analysis

example: Count({<Compliant={'Yes'},Dept=>}Compliant)/Count({<Dept=>}Compliant)

You could also try adding the overall compliance as a reference line to the first gauge

example:

    Sample.PNG

3 Replies
okolyug16
Contributor II

Re: Set a limit/filter to gauge meter

try excluding the field by adding Dept= to your set analysis

example: Count({<Compliant={'Yes'},Dept=>}Compliant)/Count({<Dept=>}Compliant)

You could also try adding the overall compliance as a reference line to the first gauge

example:

    Sample.PNG

TKendrick20
Valued Contributor

Re: Set a limit/filter to gauge meter

Added thought:

You may want to consider counting Account IDs (assuming it is unique for each account) rather than the explicit Yes or No values. Overall this is a better data structure practice and will give you more flexibility as your app grows in complexity and will account for null values and ones that are neither Yes/No in the [Account Compliant] Field.

For example your first chart (the one that doesn't change based on department) might be:

COUNT({<[Account Compliant]={"Yes"}, [Dept]=>} DISTINCT [Account Id]) / COUNT({<Dept=>} DISTINCT [Account Id])

And the one that does change:

COUNT({<[Account Compliant]={"Yes"}>} DISTINCT [Account Id]) / COUNT(DISTINCT [Account Id])

smusayev
New Contributor II

Re: Set a limit/filter to gauge meter

thank you for that suggestion.