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

Announcements
Share your agentic AI experience, learn from others, and earn a new badge: Put Agentic AI to Work
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

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

See if this helps:

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

View solution in original post

5 Replies
sunny_talwar
MVP
MVP

Is this an expression or dimension?

Not applicable
Author

It's an expression

sunny_talwar
MVP
MVP

See if this helps:

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

Not applicable
Author

Thanks, Sunny, that worked great!

sunny_talwar
MVP
MVP

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