Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
lavanya14
Contributor III
Contributor III

hour and min comparision

Hi All,

Can anyone please let me know your suggestions on the attached qvw. All the details are provided in the attachment..

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum(Aggr(If(frac(Min(TIME)) >= MakeTime(18, 00),

If(frac(Max(TIME)) >= MakeTime(22, 00) and frac(Max(TIME)) <=  MakeTime(01, 15), 45,

If(frac(Max(TIME)) >= MakeTime(02, 00) and frac(Max(TIME)) <=  MakeTime(05, 15), 90,

If(frac(Max(TIME)) >= MakeTime(05, 15) and frac(Max(TIME)) <=  MakeTime(06, 00), 135)))), CARRIER, [EQP NAME]))


Capture.PNG

View solution in original post

1 Reply
sunny_talwar

Try this

Sum(Aggr(If(frac(Min(TIME)) >= MakeTime(18, 00),

If(frac(Max(TIME)) >= MakeTime(22, 00) and frac(Max(TIME)) <=  MakeTime(01, 15), 45,

If(frac(Max(TIME)) >= MakeTime(02, 00) and frac(Max(TIME)) <=  MakeTime(05, 15), 90,

If(frac(Max(TIME)) >= MakeTime(05, 15) and frac(Max(TIME)) <=  MakeTime(06, 00), 135)))), CARRIER, [EQP NAME]))


Capture.PNG