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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formula in Loading

Dear all,

I have a QVD file with the following data:

Num:

13890101

13890201

13890231

13881229

How can I have Num and the greatest Num which is smaller than current num in load Time?

Output is like this:

Num,Num2

13890101, 13881229

13890201,13890101

13890231,13890201

13881229,13881229

Thats really kind of you if you help me.

1 Reply
syed_muzammil
Partner - Creator II
Partner - Creator II

Hi,

During load you can use order by Num Ascending. Then Create another field using the following function:

Previous(Num) as Num2.

If there are repeating values for Num, then use

if(Num=previous(Num),Num2,previous(Num)) as Num2.

Regards,

Syed.