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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
suzel404
Creator
Creator

IF into Set Analysis

Hi all,

How can I transforme IF syntax in Set analysis?

=COUNT(

IF(ARTICLE_ID=10 OR ARTICLE_ID=15

  AND Date(OpeningDate,'DD/MM/YYYY hh:mm:ss')<= Date(ClosingDate,'DD/MM/YYYY hh:mm:ss')+ maketime(vHours2),1,0

)

     )

Thanks for your help.

Labels (1)
1 Solution

Accepted Solutions
maxgro
MVP
MVP

hope I understand your question, see attachment

you find a textbox with some explanation in the attachment

View solution in original post

6 Replies
chiru_thota
Specialist
Specialist

You can try below.Variable can make code simple.

Variable1 = Date(ClosingDate,'DD/MM/YYYY hh:mm:ss')+ maketime(vHours2),1,0)

Count({<ARTICLE_ID={10,15},Date(OpeningDate,'DD/MM/YYYY hh:mm:ss')={'<=$(=$(Variable1))'}>} 1)

suzel404
Creator
Creator
Author

Hi Chiranjeevi,

Thanks for your response but it doesn't work.

maxgro
MVP
MVP

this is the ARTICLE_ID of your qvw; how can you (and other people too) check if expression works?

2014-03-21 23_37_14-QlikView x64 - [C__Users_mgrossi_Desktop_Z.qvw_].png

suzel404
Creator
Creator
Author

Massimo,

Sorry for mon qvw. My separator was not correct.


maxgro
MVP
MVP

hope I understand your question, see attachment

you find a textbox with some explanation in the attachment

suzel404
Creator
Creator
Author


Many thanks, Massimo.