Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
MK9885
Master II
Master II

Set Analysis Conditions

Hello,

I've an expression and want to satisfy 8 conditions with one expression.

I used an expression provided by a member from here

=If(Count({<STATUS = {'C'}, STARTDT = {">=$(=Floor(SuccessDate))"}>}

     STATUS) = 3,'Success',

If(Count({<STATUS = {'C'}>}STATUS) <>3,'Fail',Null()))

Conditions are:

If Startdate is less than Success Date and C count is 3 ----------- NULL

If Startdate is less than Success Date and C count is not equal to 3 ----------- Fail

If Startdate is equal to Success Date and C count is not equal to 3 ----------- Fail

If Startdate is equal to Success Date and C count is equal to 3 ----------- Success

If Startdate is greater than Success Date and C count is equal to 3 ----------- Success

If Startdate is greater than Success Date and C count is not equal to 3 ----------- Fail

If Startdate is greater than or equal to Success Date and C count is not equal to 3 ----------- Fail

But some how it is not satisfying all conditions.

Problem I'm facing is:

Success Date is based upon Extract of a file, hence I'm taking QVD refresh time to get the success date. In my QMC I've this extract file task way below and the above qvw file with conditions is on top.

So success date will not be refreshed unless the Extract qvd in refreshed.

The purpose of this set expression is to send emails to developers if the DB load was success/fail/no change.

stalwar1jontydkpiloveisfail

Thanks.

4 Replies
sunny_talwar

May be this:

=If(Count({<STATUS = {'C'}, STARTDT = {">=$(=Floor(SuccessDate))"}>}

    STATUS) = 3,'Success',

If(Count({<STATUS = {'C'}, STARTDT = {">=$(=Floor(SuccessDate))"}>}STATUS) <>3,'Fail',Null()))

MK9885
Master II
Master II
Author

It's not satisfying many conditions.

I'm attaching the sample QVW.

You change the dates in Inline to verify the conditions.

Thanks.

sunny_talwar

Change the dates in Inline? Where exactly are you using that expression? Guide me man

MK9885
Master II
Master II
Author

I'm testing those dates in Text file.

And for changing dates and checking different condition, I suggested you can do it in Inline.