Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table with values from 0 to 100. The values can be very different and have decimal places.
I want to see all values until a value around 80 is reached. That can be exactly 80, but it can also be 81.34. As soon as a value from the 80s has been reached, only null should be output.
How can I implement this?
Example:
Data | Result |
... | ... |
73 | 73 |
77,4 | 77,4 |
78 | 78 |
79 | 79 |
80,2 | 80,2 |
81,5 | null |
Thanks for your answers.
But what if the first 80 result is only 88? Then I would use this formula to exclude the value.
I need to check the value beforehand.
I have now applied a simple formula:
Index(Data, 8 )as Flag (IMPORTANT: Remember the result when 80 has been reached. In my case it is 3.)
Change the formula:
If(Index(Data, 8 ) = 3, 3, 0) as Flag
In the next step I accumulate the results of Flag.
RangeSum(Peek('Flag2'), Flag), 0) as Flag2
And then:
If(Flag2>=0 or Flag2<=3, 1, 0) as Flag3
It marks all values up to 80 and the first value of 80 with the number 1. After that only 0.
Then all values in the script or using a formula that have the value 0 can be excluded.
That's how I got the result I wanted.
Load Data, If(Data<80,Data) as Result
From YourTable;
Hi
may be this
if(Data<81,Data,nul())
Or if(round(Data,0.01)<81,Data,null())
Thanks for your answers.
But what if the first 80 result is only 88? Then I would use this formula to exclude the value.
I need to check the value beforehand.
I have now applied a simple formula:
Index(Data, 8 )as Flag (IMPORTANT: Remember the result when 80 has been reached. In my case it is 3.)
Change the formula:
If(Index(Data, 8 ) = 3, 3, 0) as Flag
In the next step I accumulate the results of Flag.
RangeSum(Peek('Flag2'), Flag), 0) as Flag2
And then:
If(Flag2>=0 or Flag2<=3, 1, 0) as Flag3
It marks all values up to 80 and the first value of 80 with the number 1. After that only 0.
Then all values in the script or using a formula that have the value 0 can be excluded.
That's how I got the result I wanted.