Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to include only one category in the field for gauge visualisation in qliksense

Hi all,

I'm trying to create a gauge visualization by selecting only one category in the field. Kindly refer below for the data:

xx.JPG

I'm trying with below syntax but it doesn't work.

=only({<[Category of Commitment] = {'Well'}>} (sum([Commitment Status])/sum[Commitment]))

May i know why the syntax doesn't work and what is the correct syntax for this?

Thank you.

1 Reply
Lisa_P
Employee
Employee

The only function is designed to look into the raw fields and select a field value if it only has one.

It looks like you only need a sum aggregation with your set analysis in each component:

sum({<[Category of Commitment] = {'Well'}>} ([Commitment Status])/sum{<[Category of Commitment] = {'Well'}>} [Commitment]))