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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
7 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

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
Partner - Master II
Partner - Master II

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
Partner - Master II
Partner - Master II

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
Partner - Master II
Partner - Master II

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?