Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
dathathreya
Creator
Creator

Wildmatch

Hi Can anyone plz explain me the below expression in detail.

=if(WildMatch([Spill Over],'N'),'N','Y')

when i use the above expression i am getting output as Y .but according to wildmatch functioning it has to show N as per my understanding,please clear me in this.

Thanks in Advance.

6 Replies
sunny_talwar

when i use the above expression i am getting output as Y .but according to wildmatch functioning it has to show N as per my understanding

Not always... where are you using this? In the script or front end?

1) If this in the script... it will check if Spill Over is N or something else... if it is N, then it will give the value N, for everything else it will give it Y

2) If this is on the front end, where are you using it? table or text box? Basically, if you have both N and Y... WildMatch([Spill Over] will have two values which cannot be evaluated... so the default it to the false statement which is Y.

dathathreya
Creator
Creator
Author

i am using in backend script and the logic is like if(2018-2019<>2017-2018 and wildmatch(spillover,'N'),'N','Y')

here in spill over fields i have both N and Y .and  it is taking only Y .i am not understanding y it is taking only Y as N is the 1st parameter.

sunny_talwar

Could it be something related to your first condition?

poojashribanger
Creator II
Creator II

what it does is first it checks  2018-2019<>2017-2018 condition and then checks for second condition only if both are true  then  N else Y.

vishalarote
Partner - Creator II
Partner - Creator II

Instead of if Condition i used pick() function it works.

pick(WildMatch([Spill Over],'N','Y'),'N','Y')

Inline Table :

load *,

pick(WildMatch([Spill Over],'N','Y'),'N','Y') as New_Spill_Over

Inline [

No,Spill Over

1,N

2,N

3,N

4,Y

5,Y

];

MarcoWedel

please post some sample data and your expected result