Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

expression help

I want to show number of days for condition

if( IN_TIME > GraceTime ) and Attendance_status = 'P' and 'POW' than it shud give me number of days.

please help me to write it in set analysis.

9 Replies
sasikanth
Master
Master

Try some thing like below

count({<Attendance_status = {'P' , 'POW'}>}if( IN_TIME > GraceTime,days))

PrashantSangle

Hi,

Try like this

Count(if(Wildmatch(Attendance_status,'P','POW') and IN_TIME>GraceTime,NoOfDays)

if you want distinct No of Days then write

Count(if(Wildmatch(Attendance_status,'P','POW') and IN_TIME>GraceTime,Distinct NoOfDays)

Need Sum write Sum instead of Count.

Or

Count({<Attendance_status={"P","POW"},IN_TIME={">$(=GraceTime)"}>} NoOfDays)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable

Dear Abhay,

There are two ways:-

1. count({$<Attendance_status= {'P' , 'POW')},IN_TIME={">=$(GraceTime)"}>}days)

2. If(IN_TIME>GraceTime,(count({$<Attendance_status= {'P' , 'POW')}days))

Thanks &Regards

Prince Anand

Not applicable

Use the expression as Max suggested but

Remember the fields IN_TIME and GraceTime must be of same date format.

You can convert them into numbers in script level and also use them to avoid confusion.

Thanks,

Singh

Not applicable

Hi,

You Can Use the following Exp. :

Count({<IN_TIME={">$(=GraceTime)"},Attendance_status={'P','POW'}>} NoOfDays).


Regards,

Saurabh

Anonymous
Not applicable

Both expression are not working

Not applicable

Dear Abhay,

Please check the attached app.

Thanks & Regards

Prince Anand

Anonymous
Not applicable

Anand,

Here INtime is like 08:30:00 similar to ShiftStartTime not numeric.

Not applicable

Dear Abhay,

Please check the attached app.

Thanks & Regards

Prince Anand