Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Using the data in the table below, I am trying to show the Age in Days where the completed reached 99% of the total. In the example it was on day 7. How can I use this in an expression or enter it into my script? Any help would be appreciated.
| Complete | Age in Days | Result |
|---|---|---|
| 50 | 1 | |
30 | 2 | |
| 10 | 3 | |
| 8 | 4 | |
| 1 | 7 | 7 |
| 1 | 8 | |
You might not have shared the complete data where you might have to repeat this for different IDs. The code will currently not be able to handle it since I don't know what that field is, but you would just need a if statement to handle it.
Script for your sample:
Table:
LOAD *,
If(Temp = 99, [Age in Days]) as Result;
LOAD Complete,
[Age in Days],
RangeSum(Peek('Temp'), Complete) as Temp
FROM
[https://community.qlik.com/thread/208511]
(html, codepage is 1252, embedded labels, table is @1)
Where Len(Trim(Complete)) > 0;