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

choosing from multiple values in formula

One of our databases has multiple values for billing a customer:

mv.png

I wanted to determine if a customer has a monthly fee or not. However, the formula

IF(Per_Bill.PMC_Code='MONTHLY',1,0)

always returns zero. I figure this is because QV sees the two possible values for the PMC_Code,

doesn't know which one to choose, and so evaluates the condition as NULL, and hence the result

is zero.

I've tried multiple combinations of conditions within the IF, to no avail.

Any one know how I might handle this?

thanks,

Kevin

1 Solution

Accepted Solutions
sunny_talwar

See if this helps:

If(WildMatch(Concat(Per_Bill.PMC_Code, '|'), '*MONTHLY*'), 1, 0)

View solution in original post

5 Replies
sunny_talwar

Is this an expression or dimension?

Not applicable
Author

It's an expression

sunny_talwar

See if this helps:

If(WildMatch(Concat(Per_Bill.PMC_Code, '|'), '*MONTHLY*'), 1, 0)

Not applicable
Author

Thanks, Sunny, that worked great!

sunny_talwar

Awesome

I am glad it helped. If you got what you wanted, can you close the thread by marking the correct answer and/or any helpful answers.

Best,

Sunny