Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I remember QlikView has such function, but I forgot where I saw it.
Status_mapping_tab:
Load * inline [
GreaterThan,LessThan,StatusName
0,5,Good
6,10,Normal
10,100,Bad
];
Assume here has a table like above one, which include the value range for performance report.
If the value is in the range (defined as >=GreaterThan and <=LessThan), than value can be mapped to that type.
E,g:
If the web page response time less than 5 second, performance is "Good“, if >=6 and <=10 second, "Normal". Otherwise, ‘Bad'
So, is there any function can be used as FunctionName([Mapping Name], [value]).
E.g:
FunctionName('Status_mapping_tab', 4.5) = Good
FunctionName('Status_mapping_tab', 8.5) = Normal
BTW, as I know, mapping & applymap() are used for a single value, instead of range. If I am wrong, please correct me.
I think you want to make an IntervalMatch:
MockUpData:
Load round(rand()*100) as ResponseTime autogenerate 30;
Status_mapping_tab:
Load * inline [
GreaterThan,LessThan,StatusName
0,5,Good
6,10,Normal
10,100,Bad];
IntervalMatch:
IntervalMatch (ResponseTime) Load GreaterThan,LessThan resident Status_mapping_tab ;
/HIC
I think you want to make an IntervalMatch:
MockUpData:
Load round(rand()*100) as ResponseTime autogenerate 30;
Status_mapping_tab:
Load * inline [
GreaterThan,LessThan,StatusName
0,5,Good
6,10,Normal
10,100,Bad];
IntervalMatch:
IntervalMatch (ResponseTime) Load GreaterThan,LessThan resident Status_mapping_tab ;
/HIC