Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to cap a number

I am measuring the forecast accuracy.

Forecast=5

Actual = 1

Forecast Accuracy = 1-abs(actual-forecast)/actual = 1- 400%= -300% But I need it to be 0%

I'd like to either cap 400% to be 100% or -300% to 0%. Is there a cap function in Qlikview? Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

rangemin(1,1-fabs(actual-forecast)/actual)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

rangemin(1,1-fabs(actual-forecast)/actual)


talk is cheap, supply exceeds demand
Not applicable
Author


It works! Thank you a lot!