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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

oracle decode() in Qlik

Hi Experts,

Can any one please help me on replicating below Oracle decode() logic into Qlik.

decode(Product,  'Y' , 'b' , 'N' , 'a' , null)

Thanks in advance.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Like this:

(case-sensitive)

=Pick(Match(Product, 'Y', 'N'), 'b', 'a')


(case-insensitive)

=Pick(WildMatch(Product, 'Y', 'N'), 'b', 'a')


Will return Null() if Product is anything other than 'Y'; or 'N' (or 'y', 'n') for case-insensitive version.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Like this:

(case-sensitive)

=Pick(Match(Product, 'Y', 'N'), 'b', 'a')


(case-insensitive)

=Pick(WildMatch(Product, 'Y', 'N'), 'b', 'a')


Will return Null() if Product is anything other than 'Y'; or 'N' (or 'y', 'n') for case-insensitive version.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
mahitham
Creator II
Creator II
Author

Hi Jonathan,

Thanks for your help.

In my query I have

derive_day_count(p.metricname)

is derive_day_count is the function of oracle. which function need to use alternatively in Qlikview. Please help me.

jonathandienst
Partner - Champion III
Partner - Champion III

I am not sure that derive_day_count is an Oracle built-in function. I suspect that it is a user defined function. Start a new thread and explain exactly what you expect the function to do and I or someone else will be able to help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein