Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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_michaelid
Honored Contributor II

Re: Creating flags in load scripts

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

Re: Creating flags in load scripts

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

jason_michaelid
Honored Contributor II

Re: Creating flags in load scripts

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

Re: Creating flags in load scripts

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

jason_michaelid
Honored Contributor II

Re: Creating flags in load scripts

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

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

Hope this helps,

Jason

Not applicable

Re: Creating flags in load scripts

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

jason_michaelid
Honored Contributor II

Re: Creating flags in load scripts

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?

Community Browser