Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikNL
Contributor
Contributor

Illness hours bucket

Hi,

I want to make buckets for illness hours. But i do not know how. Can somebody help me plaease?

My data: See attachment

 
 

How to make these buckets?

Thanx in advance.

 

 

 

Labels (1)
2 Replies
edwin
Master II
Master II

why does  (total hrs and illness hrs =9, lines 2 to 7) in bucket >4 and at the same time its in bucket >6 (lines 20-27).  what differentiates them?

in general, there are two ways to approach this.  
1. if your definition of bucket is based on totals (bucketing for the aggregated day), then you have to compute it on the fly in your chart.  it answers the question, what bucket is the total for this date is in.
2. if your definition of bucket is based on the transaction, you need to determine it in the script, it answers the question what bucket is this transaction in and you can show volume per bucket per date.

it appears your question is more in line with #1, the logic for determining the buckets is to run it against a range.   a simple solution would be below (assuming your total expression is labeled TOTAL ILLNESS), create a new expression with the following

=if([TOTAL ILLNESS]>6,'>6',
     if([TOTAL ILLNESS]>4, '>4',
         if([TOTAL ILLNESS]>2, '>2', '<=2'
         )
     )
)

 

you can implement a similar logic in your script if you want to implement #2 scenario.

Brett_Bleess
Former Employee
Former Employee

Have a look at the following Design Blog post regarding the IntervalMatch function, I believe that may be what you are looking for here:

https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.