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

Interval in expression

Hi everyone,

Does anyone know if I can in table expression to check whether some percentage value less then other in some field?

I have table with field Year,Minimal Realization % and Bonus Amount (LCY),(picture below). What I want is to check all values from field minimal realization and gave him bonus amount if calculated value is less than values in minimal realization.

If my calculated vlaue is 93%, I want to gave him 10.000,00 bonus

1.png

I make simple example in QV.

1.png

I want in straight table in expression to check for example:

     If 94% (Realization %) < 100% (Minimal Realization %) then he get 10.000 bonus

Is this possible to do in expression?

Hope someone can help me

1 Solution

Accepted Solutions
Not applicable
Author

Stefan,

assuming that bonus grows up when minimal realisation grows up, yu may define chart with:

dimension: EmployeeName

expression (one of):

a) max(if([Realization %]>[Minimal Realization %],[Bonus Amount]))

b) FirstSortedValue([Bonus Amount], if([Realization %]>[Minimal Realization %],-[Minimal Realization %]))

regards

View solution in original post

5 Replies
Not applicable
Author

Stefan,

assuming that bonus grows up when minimal realisation grows up, yu may define chart with:

dimension: EmployeeName

expression (one of):

a) max(if([Realization %]>[Minimal Realization %],[Bonus Amount]))

b) FirstSortedValue([Bonus Amount], if([Realization %]>[Minimal Realization %],-[Minimal Realization %]))

regards

Gysbert_Wassenaar

You can use the intervalmatch function. See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Gysbert thanks for you quick reply.

It was helpfull, but my problem is I dont know  Realization % in script, I calculate that in straight table expression, and there I want to check in what interval he belongs.

Is this posible at all?

Not applicable
Author

You may find alternative approach also here:

Re: pick rating on the fly using calculated score

regards

Darek

Not applicable
Author

Txn Dariusz,

Your answer is correct