Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Comparing two fields in Set Analysis

Hello,

Can anybody tell what is the syntax error in this expression:

=count({<_IN_TIME={'>ShiftStartGraceTime'}>} DISTINCT(%Date))

Regards,

Balraj

19 Replies
anbu1984
Master III
Master III

Do you want to compare _IN_TIME and ShiftStartGraceTime in the same row? Then try this


=Count( Distinct If(_IN_TIME > ShiftStartGraceTime, %Date))


PrashantSangle

Hi,

What is format of _IN_TIME and ShiftStartGraceTime?

if possible share smaple apps?

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 🙂
lironbaram
Partner - Master III
Partner - Master III

what exactly are you looking  to achieve in the formula

does the two fields are in the same tables?

Anonymous
Not applicable
Author

Liron,

Both are in two different tables.

I have to count late comers using this formula.

Regards,

Balraj

lironbaram
Partner - Master III
Partner - Master III

hi

set analysis won't work as it replaces selections not if statemnet

assuming that for each _in_time record there is only one shiftgracetime

then try to use

Count (DISTINCT if( _IN_TIME >ShiftStartGraceTime, %Date ))


how the two tables are connected?

Anonymous
Not applicable
Author

its Field

Anonymous
Not applicable
Author

Count( Distinct If(_IN_TIME > ShiftStartGraceTime and _AttendanceStatus='P' ,'POW'  , %Date))

What is the error in this syntax?

PrashantSangle

Hi,

Is you and Abhay Singh Working on same project?

Check this thread

http://community.qlik.com/thread/135313

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 🙂
Anonymous
Not applicable
Author

Yes,

But still we have not got the solution, I have checked the Time Format twice but not able to use SET Analysis properly..

=Count( Distinct If(num(_IN_TIME) > num(ShiftStartGraceTime) and _AttendanceStatus='P','POW','MIS' , %Date))

Tried If as well but not working

anbu1984
Master III
Master III

=Count( Distinct If(num(_IN_TIME) > num(ShiftStartGraceTime) and Match(_AttendanceStatus,'P','POW','MIS') , %Date))