Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating flags in load scripts

Hello

I have the first 4 columns, and i want to achieve the 5 (Highest version per Offnum) column.

OffNum      OffLine     Version     Amount    HighstVersion

     1               1               1               10                    0

     1               2               1               15                    0

     1               1               2               9                      1

     1               2               2               14                    1   

     2               1               1               4                      1

     2               2               1                9                     1

Anybody has any idea how to do this?

Thanks

7 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Do you want to do this in the load script where user-selections will not be accounted for, or in the UI based on user-selections?

Not applicable
Author

We would like to do this based on user seletions in the UI.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Shouldn't your 5th column above be 2,2,2,2,1,1 ?

"2" is the highest version for OffNum 1, "1" is the highest version for OffNum 2.

Not applicable
Author

Thats also possible, I was more thinking of a flag 1, 0 as True (this line has the highest version) or False.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Ah - OK. In that case, add this expression:

IF(Version=Max(TOTAL <OffNum> Version),1,0)

Hope this helps,

Jason

Not applicable
Author

I am sorry, i do want it in the load script. Then this expression won't work I suppose.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

If you put this in the load script it won't be affected by user selections.  No problem to do it but I need some more information to help you.  Can you provide a sample app?