Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Gysbert_Wassenaar

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

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


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Not applicable
Author

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
Author

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.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

-Rob

Not applicable
Author

In a Chart. 

Thanks,

Lew

Gysbert_Wassenaar

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

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


talk is cheap, supply exceeds demand
Not applicable
Author

Gysbert,  

Most appreciated, the first expression did the trick!  

Best Regards,

Lew