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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Write Expression for Completion Day

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.

CompleteAge in DaysResult
501

30

2
103
84
177
18
1 Reply
sunny_talwar

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;


Capture.PNG