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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
reporting_neu
Creator III
Creator III

When value reaches ~80 than null

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
Labels (3)
1 Solution

Accepted Solutions
reporting_neu
Creator III
Creator III
Author

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.

 

View solution in original post

3 Replies
Or
MVP
MVP

Load Data, If(Data<80,Data) as Result

From YourTable;

brunobertels
Master
Master

Hi 

may be this 

if(Data<81,Data,nul()) 

Or if(round(Data,0.01)<81,Data,null()) 

reporting_neu
Creator III
Creator III
Author

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.