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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
JThomas86
Contributor
Contributor

QLIK IF Function Error Message

Hello all,

Hoping to tap into some of the expertise around the forums.  

I'm fairly new to using QLIK and it's functions.  I was trying to use an IF function to sort data into buckets based on their value - e.g. all fields with a value between 1 and 15 go into the 1-15% bucket.  I kept getting an error message on this IF function, so I tried the pick and match formula:

=pick(match([Claim - Result of Latest WPI%],'1-15', '16-21', '21-30', '>31'), '0-15%', '16-21%', '21-30%', '>31%')

The formula is saying okay but the chart remains blank saying the selection generated no data. 

Hoping someone may have some insights to point me in the right direction.

Labels (1)
5 Replies
Lokesh_5045
Creator
Creator

@JThomas86 Try this way.

If([Claim - Result of Latest WPI%] <= 15, '1-15',
If([Claim - Result of Latest WPI%] <= 21, '16-21',
If([Claim - Result of Latest WPI%] <= 30, '21-30','>31')))

You can use this script in front end as well as in backend. If you want to use this in the chart, create a master measure and then use the measure in the chart.

JThomas86
Contributor
Contributor
Author

Thanks for the reply Lokesh.  I should have been more clear in my initial question, I do apologise.

I need four buckets:

0-15%,
16-20%,
21-30%
 >31%

When I try to create an additional line (for the last bucket) using your recommendation I keep getting the error message again.

Lokesh_5045
Creator
Creator

Please post the error message. So that we can understand which type of error is appearing.

Lokesh_5045
Creator
Creator

@JThomas86 I said create a master measure in the previous messages. Its a master dimension. But it is created in the fronend.

Lokesh_5045
Creator
Creator

Lokesh_5045_0-1686116690842.png

Result table:

Lokesh_5045_1-1686116731167.png