Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Calculate number of days over threshold

I am trying to figure out a way to calculate the number of days an item has been flagged as over a specific threshold.

To be more specific SEGMENT is made up of multiple disks, each DISK will have different values over a selected time frame.  Lets say my timeframe is 5 days and vThreshold = 30 -- data may look something like this:

SEGMENTDISKDATA_TSSEEK TIME
1$FC010110/01/201228
1$FC024410/02/201232
2$FC210010/01/201219
3$FC320010/03/201230
3$FC014010/01/201234
3$FC014010/02/201228
3$FC014010/03/201233
3$FC014010/04/201235
7$FC010110/02/201244
7$FC230110/05/201220

I would like a result table that looks like this:

SEGMENTDISKDAYS OVER THRESHOLD
1$FC02441
3$FC32001
3$FC01403
7$FC01011
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Calculate number of days over threshold

try: sum(if([Seek Time] >= vThreshold,1,0))

or maybe count({$<[Seek Time]={'>=$(vThreshold)'} >} Disk)


talk is cheap, supply exceeds demand
6 Replies
Not applicable

Re: Calculate number of days over threshold

could u post how u're calculating Days over threshold using thershold value of 30 for each segment.

mention something abt seek time

Not applicable

Re: Calculate number of days over threshold

Days over threshold is to be calculated by counting the number of days where SEEK TIME >=30, i.e. how many days does a specific DISK show up with a SEEK TIME >= 30 over a select DATA_TS range.  Hope this helps.

MVP & Luminary
MVP & Luminary

Re: Calculate number of days over threshold

Do you want to calculate this in the script or a chart?

-Rob

Not applicable

Re: Calculate number of days over threshold

In a Chart. 

Thanks,

Lew

MVP & Luminary
MVP & Luminary

Re: Calculate number of days over threshold

try: sum(if([Seek Time] >= vThreshold,1,0))

or maybe count({$<[Seek Time]={'>=$(vThreshold)'} >} Disk)


talk is cheap, supply exceeds demand
Not applicable

Re: Calculate number of days over threshold

Gysbert,  

Most appreciated, the first expression did the trick!  

Best Regards,

Lew