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: 
subbareddykm
Creator II
Creator II

How to pick ?

Hi,

 

 

PRPODate_A3Date_A4Date_A5PHPB
100711
10072
100733
10074
100755
100766
10077
100788
10079

I want to create logic like , I have a PR ,PO, Dates.

Logic is  :

If my PR have  PO i have to pick Date_A3,if my PR do not have  PO i have to check Date_A4 and Date_A5.

How to achieve this ?

Labels (1)
1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

Yes, that is how it works now. So for 10072 if you have date in Date_A4 it will pick only Date_A4 and it will not pick the date in Date_A5. Try it out and let e know.

For the front end you can use as below:

If(Len(Trim(PO))>0,Date_A3,Alt(Date_A4,Date_A5))

Hope this helps....

View solution in original post

9 Replies
Anil_Babu_Samineni
MVP
MVP

Perhaps This

If(PR = PO, Pick(Match(Date_A3,PR)), If(PR <> PO, Pick(Match(Date_A4,PR),Date_A5)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
trdandamudi
Master II
Master II

See if the below solution works for you:

Pick_Based_On_PO.jpg

Note: When PR do not have a PO, it will pick the date from Date_A4. If Date_A4 is blank then it will pick from Date_A5.

Anonymous
Not applicable

Hi,

Could you have three dates completed?

If the answer is yes, then use this code:

Table:

Load

    PR,

    PO,

    Date_A3 as Date,

    PH,

    PB

RESIDENT YourTable

WHERE Not(IsNull(PO));

Table:

Load

    PR,

    PO,

    Date_A4 as Date,

    PH,

    PB

RESIDENT YourTable

WHERE IsNull(PO) and Not(IsNull(Date_A4));

Table:

Load

    PR,

    PO,

    Date_A5 as Date,

    PH,

    PB

RESIDENT YourTable

WHERE IsNull(PO) and Not(IsNull(Date_A5));

Table:

Load

    PR,

    PO,

    Null() as Date,

    PH,

    PB

RESIDENT YourTable

WHERE IsNull(PO) and IsNull(Date_A5) and IsNull(Date_A4);

If your answer is no, then use this code:

Table:

Load

    PR,

    PO,

    IF(IsNull(PO),Alt(Date_A4,Date_A5),Date_A3) as Date,

    Date_A3 as Date,

    PH,

    PB

RESIDENT YourTable;

Regards!!

puttemans
Specialist
Specialist

Hi,

Could you get a correct input example and what you expect as a result? Right now, it's not completely clear what you'd need.

Regards

subbareddykm
Creator II
Creator II
Author

Sorry For the late reply,

I want show pick date

1.If My PR is haveing PO , I have to Pick Date_A3,

2.If My PR is do not have PO , I have to check Date_A4(Note: if i do not have Date_A4, go to Date_A5. Iwant it in Front End)


I hope u inderstand .


Thankx i Adv

subbareddykm
Creator II
Creator II
Author

Hi,

You right, But i your data againist 10072 if date in Date_A4 it should not go to Date_A5.

The same thing , Can u tell me how to get it Front End

subbareddykm
Creator II
Creator II
Author

PRPODate_A3Date_A4Date_A5PHPB
1007111/1/2016 6/1/2016
10072 4/1/20166/2/2016
1007331/2/1900 6/3/2016
10074 4/3/20166/4/2016
1007551/4/1900 6/5/2016
100766 4/5/20166/6/2016
10077 1/6/1900 6/7/2016
100788 4/7/20166/8/2016
10079 1/7/1900 6/9/2016
Anonymous
Not applicable

For front end:

IF(IsNull(PO),Alt(Date_A4,Date_A5),Date_A3)


Regards!

trdandamudi
Master II
Master II

Yes, that is how it works now. So for 10072 if you have date in Date_A4 it will pick only Date_A4 and it will not pick the date in Date_A5. Try it out and let e know.

For the front end you can use as below:

If(Len(Trim(PO))>0,Date_A3,Alt(Date_A4,Date_A5))

Hope this helps....