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

NAMESTARTDTENDDTSTATUSCYCLE_IDStatus
111/29/2016 10:5411/29/2016 12:36C2031
211/29/2016 9:3011/29/2016 12:29C2021
311/29/2016 9:0011/29/2016 9:30C201

1

SuccessDate is a different field which will update my latest extract qvd refresh date.

If StartDt greater than SuccessDt & if C Count is 3 ---Success

If StartDt greater than SuccessDt & if C Count is not equal to 3 ---Failure

If StartDt is equal to SuccessDt & if C Count is 3 ---Do Nothing

If StartDt is equal to SuccessDt & if C Count is not 3 ---Failure

Note: Some times the Status is also P and End Date will be 11/29/9999

I've tried the following

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

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

stalwar1

Thanks.

1 Solution

Accepted Solutions
stig1984
Creator II
Creator II

Try

=If(Count(

     {<

     STATUS = {'C'},

     floor(STARTDT) = {">floor(SuccessDT)"}

     >}

     STATUS) = 3,

"Success",

If(Count(

     {<

     STATUS = {'C'}

     >}

     STATUS) <>3,

"Fail",

Null()))

View solution in original post

6 Replies
Gysbert_Wassenaar

Perhaps something like this:

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


If that doesn't work then post a small qlikview document with example data that demonstrates the problem.


talk is cheap, supply exceeds demand
stig1984
Creator II
Creator II

Try

=If(Count(

     {<

     STATUS = {'C'},

     floor(STARTDT) = {">floor(SuccessDT)"}

     >}

     STATUS) = 3,

"Success",

If(Count(

     {<

     STATUS = {'C'}

     >}

     STATUS) <>3,

"Fail",

Null()))

MK9885
Master II
Master II
Author

PFA.

And I tried your logic but it doesn't seem to work. You can adjust accordingly as I added Inline load but in realtime i'll be fetching it from db.

If you planning to reload the script the successdate might not work maybe if you can add that too in another Inline.

Thanks.

MK9885
Master II
Master II
Author

Thank but your expression has some syntax error.

I edited it to below

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

     STATUS) = 3,'Success',

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

Correct me if I did it wrong.

I've attached the sample file above....

MK9885
Master II
Master II
Author

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

     STATUS) = 3,'Success',

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

The above expression seem to be working.... Not fully tested but it is.. for now.

stig1984
Creator II
Creator II

glad it worked - apologies for the syntax errors - wasn't 100% sure which dates you wanted as integers.