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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
seemawadekar
Contributor III
Contributor III

Identify a value for a metric based on the range from a table/ score the metric based on ranges defined in a table.

Hi,

I am trying to identify a value that needs to go into KPI based on range of values of a metric (stored in a table) on the sheet (should be able to aggregate or slice based on filter selections) 

On the sheet, I am calculating the master measure for each metric, then it needs to identify which range it falls under and then assign the points associated to that range to a KPI.  Each metric has multiple ranges. 

The criteria table looks like this

seemawadekar_0-1676581531678.png

Any pointer?

Thank you. 

Labels (2)
1 Solution

Accepted Solutions
seemawadekar
Contributor III
Contributor III
Author

Thank you all for your responses. 

I ended up calculating the values in load script, then Join it with the metric table and then using MAX(points ) on the chart. 

View solution in original post

7 Replies
Aditya_Chitale
Specialist
Specialist

Can you share sample qvf along with your desired output ?

Regards,

Aditya

henrikalmen
Specialist II
Specialist II

Take a look att the IntervalMatch() function, perhaps it will help you do what you want to achieve. https://help.qlik.com/en-US/sense/November2022/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPref...

seemawadekar
Contributor III
Contributor III
Author

Hi, Intervalmacth() works in load script only. I need to do this on the sheet. 

seemawadekar
Contributor III
Contributor III
Author

Unfortunately not due to company policies. 

 

henrikalmen
Specialist II
Specialist II

Are you saying that you are calculating a number, and you need to know what points that result should be assigned based on the criteria table?

Maybe you should try to create an expanded criteria table in load script, that looks something like this:

Metric Name RangeIndex Points
Metric1 1 1
Metric1 2 1
Metric1 3 1
... ... ...
Metric1 10 1
Metric1 11 5
Metric1 12 5

...and so on.

Then you could check the result of your calculation against the RangeIndex column in the expanded criteria table and extract the Points value from there.

seemawadekar
Contributor III
Contributor III
Author

Thanks @henrikalmen  Will try that and let everyone know. 

 

seemawadekar
Contributor III
Contributor III
Author

Thank you all for your responses. 

I ended up calculating the values in load script, then Join it with the metric table and then using MAX(points ) on the chart.