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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
achates2008
Contributor III
Contributor III

Strange interval match issue

I encountered a strange interval match issue.

I am trying to get a commission rate by matching profit % with a profit range, so different profit% will have different commission rate.

In database, profit% is maintained in step, like 5, 10, 15..., I converted it to a range by adding a decimal, so I got below. If given profit fell into specific stand-end range, then I got the rate.

start, end, commission rate

0 , 5, 1%

5.0001, 10,  2%

10.0001,15, 3%

....

For most of the cases, it works properly. However, there are always some cases that it will not get a commission rate (show as null value). I tried to add a decimal 0.00001 to the given profit%. It resolved some issues, but it will still have other similar issues. It looks like a bug of the system, really have no idea for the reason. Anyone can help?

Since there is no clue in which circumstances this will happen, I don't know how to provide an example.

 

 

Labels (1)
10 Replies
Brett_Bleess
Former Employee
Former Employee

Just going to leave a couple of links here as well that may come in handy for others that run across this post:

Design Blog post on IntervalMatch:

https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547

Design Blog post on rounding issues:

https://community.qlik.com/t5/Qlik-Design-Blog/Rounding-Errors/ba-p/1468808

Hopefully these may help others that run across this one.  Achates, I am also going to mark your last post as the solution on this one as well, just FYI.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.