Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data source field containing job codes with a prefix of ‘C’, ‘I’ and ‘N’. Another field in the table reflects the hours spent against such codes.
On a ‘Gauge’, I can sum all hours against all codes no problem, but wish to;
Firstly, filter to show each code sum independently on a separate Gauge,
Next to show the cumulative sum of ‘C’ and ‘I’ codes on a gauge,
Finally, show the cumulative sum of ‘C’ and ‘I’ codes, excluding a specific ‘I’ code (I-0000123).
Most grateful for your advice on this as I am relatively new to Qlik.
Hi Steve,
What I would do is create a data island (with the status you want to see) like so
Codes:
Load * inline
[
_Name
C+I
All
C+I-0000123
];
and set it up above the gauge you want.
The expression would have a set analysis according to the selection made above
sum({<$(vSetCode)>}Values)
On the vSetCode variable, i'd set it with:
=if
(
GetFieldSelections(_Name)='All',
'Type=',
if
(
GetFieldSelections(_Name)='C+I',
'Type={"C","I"}',
'Type={"C","I"},Code-={"0000123"}'
)
)
Which would give me the options you want.
As a result, i'd have the following:
'All' selected
'C+I' selected:
'C+I-0000123' selected
Attached the QVW I used.