Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
sona_sa
Creator II
Creator II

OR CONDITION in SET ANALYSIS EXPRESSION

Hi,

I have an expression - Count(DISTINCT If((DOL1='01/01/1900' or DOL1 >= Date(Today(),'DD/MM/YYYY')),EmpCode))

Output is coming correct - 4720

When I am using the same expression in SET ANALYSIS - Output is not correct.

Count({<[DOL1]={'01/01/1900'}>+<[DOL1]={">$(=Date(Today(), 'DD/MM/YYYY'))"}>} Distinct [EmpCode])

Before + Operator is working and Output is 4707, But After + Operator (Greater Than Today) is not working.

Can anyone correct the same

Labels (2)
4 Replies
MayilVahanan

HI Sona,

I think, you missed >= in ur set analysis.

Count({<[DOL1]={'01/01/1900'}>+<[DOL1]={">=$(=Date(Today(), 'DD/MM/YYYY'))"}>} Distinct [EmpCode])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Remington
Contributor
Contributor

Do I need to exclude/ignore some selections or values? After you've answered the questions, you can go on to compse the expression.

Tell The Bell

sona_sa
Creator II
Creator II
Author

Hi,

I used your expression, Not working. Please find the attached xls and let me know.

Thanks.

MayilVahanan

HI Sona,

When checked ur excel, its looks like ur date field in Text format,

LOAD EmpCode,
Date(Date#(DOL1,'DD/MM/YYYY'),'DD/MM/YYYY') as DOL1,
[Head Count]
FROM
[D:\Qlik\Com\HC.xls]
(biff, embedded labels, table is Sheet1$, filters(
Remove(Row, Pos(Top, 2))
));

After change to Date format, Both If & Set analysis has same values 

MayilVahanan_0-1624757549993.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.