Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
fmazzarelli
Partner - Creator III
Partner - Creator III

COUNT

Hi Community

count({<PRIORITY = {'Low'}>,<TEMPOTRASCORSO = {'>=0 AND <=24'}>} [TICKET])

count({<PRIORITY = {'Low'}>,<TEMPOTRASCORSO = {'>=25 AND <=50'}>} [TICKET])

count({<PRIORITY = {'Low'}>,<TEMPOTRASCORSO = {'>=51 AND <=100'}>} [TICKET])

EXAMPLE

TABLE

PRIORITY     TEMPOTRASCORSO

low               34

low               1

low               292

normal          23

normal          2

urgent          3

urgent          40

urgent           455

Normally I count(PRIORITY) but this time I need to count how many TICKET fall in the range indicated TEMPO TRASCORSO having priority Low or normal or urgent

Any suggest?

14 Replies
fmazzarelli
Partner - Creator III
Partner - Creator III
Author

Hi,

the result is 0.

no work

sunny_talwar

Does [PROGRESSIVO SEGNALAZIONI] repeat and can possible have multiple DELTAs and/or multiple TempoTrascorso?

vinieme12
Champion III
Champion III

Use the same expression in Set Analysis or Preferably create a field

in loadScript for TempoTrascorso example

interval(interval#('TempoTrascorso ','d mm:hh:ss'),'h') as Hrs_TempoTrascorso;


for now try below;

count({< [PROGRESSIVO SEGNALAZIONI] = {"=PRIORITY = 'Low' AND (interval(interval#('TempoTrascorso ','d mm:hh:ss'),'h')>=0 AND interval(interval#('TempoTrascorso ','d mm:hh:ss'),'h')<=24)"}>} [PROGRESSIVO SEGNALAZIONI])


After you create a numeric field use

count({< [PROGRESSIVO SEGNALAZIONI] = {"=PRIORITY = 'Low' AND Hrs_TempoTrascorso>=0 AND Hrs_TempoTrascorso<=24)"}>} [PROGRESSIVO SEGNALAZIONI])


Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
fmazzarelli
Partner - Creator III
Partner - Creator III
Author

Hi

PROGRESSIVO SEGNALAZIONE is a value as a key.

fmazzarelli
Partner - Creator III
Partner - Creator III
Author

Hi,

in loadscript already exist

     DTDELTA  AS DELTA,

    interval(Interval#([DTDELTA],'D hh:mm'),'h') as TempoTrascorso,

    yours ....interval(interval#('TempoTrascorso ','d mm:hh:ss'),'h') as TempoTrascorso1,

and TempoTrascorso contains values converted in hour (0, 1, 2, 3, 35, 96 ....)

But formula

count({< [PROGRESSIVO SEGNALAZIONI] = {"=PRIORITY = 'Low' AND (TempoTrascorso)>=0 AND (TempoTrascorso)<=4"}>} [PROGRESSIVO SEGNALAZIONI])

consider 4 day instead of 4h.

So that my column

'Entro 4 h'

count 1 until 96 and then 0.

instead of count should be 4 until 4 and then 0