Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Using Flags in Load Script

Hi guys,

I have searched the forum looking for posts relating to using flags in Load script to simplify expressions in charts. Oleg had a post, but the link to the post does not work anymore. Can someone please provide a very basic, simple and clear example of how to use these flags as I am unsure of how to do it?

Thank you

4 Replies

Using Flags in Load Script

Hi,

    You can use variables in scripts which can act like a flag.

    Will you please explain what you want to achieve using flags.

Thanks & Regards,

Kaushik Solanki  

Not applicable

Using Flags in Load Script

I m trying to do something like this as an expression,

count ({<Strat1 ={'1'}, app_date = strat_date>}distinct customer_id)


but from my understanding, in set analysis you can't compare two fields together, as the app_date and the strat_date are both fields in my application. I have been advised to try and use flags in the load script to handle this, so any thoughts on this or any other way of re-writing this expression to get it to satisfy those conditions would be appreciated.

Thanks

nagaiank
Valued Contributor III

Re: Using Flags in Load Script

Though I do not know the requirements of your application nor what you are trying to do, I can answer a part of your question.

When you were advised to try the use of flag, probably s(he) meant this:

(1) In the logical table having the fields app_date and strat_date, add a field (let us call it 'date_flag') which is true when the dates are equal. (You can do this by adding (app_date = strat_date) as date_flag in your load script.

(2) Use this flag in your set analysis expression instead of comparing dates (e.g. count ({<Strat1 ={'1'}, date_flag = {'true'}>}distinct customer_id)

Hope this helps.

Not applicable

Using Flags in Load Script

Thanks for your reply krishnamoorthy. I will try it out and let you know how it goes

Community Browser