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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Flag in script

Hi

I have imported two spreadsheets and created a single table in Qlikview.  I would like to add a flag field that would indicated where three of the fields are populated with values ie. it should reflect "1" if there is a value in all three fields and "0" if there is a missing value on any of the fields.

The dilemma I have is that I have left joined each table and created one table so the fields are not recognised when using the flag.

I am using the following formula in the load script.

If (Dom_InflRate<>null() and For_InflRate<>null() and XRate<>null(), Flag=1, Flag=0)

I have attached the screenshot of the table.

Please help.

13 Replies
Not applicable
Author

HI Henrik

Could you also assist with the minimum date filters.  As you will see, the data starts at different dates for the three fields of interest for each currencypair.  I would like to create a minimum date filter for each field.

Thanks

henrikalmen
Specialist II
Specialist II

I'm not sure what it is you want but perhaps something like this:

MinimumDate: load CurrencyPair, min(Date) as mindate Resident ExchangeRates group by CurrencyPair;

Maybe this will at least send you in the right direction.

Not applicable
Author

Hi Henrik

Thank you ,

I am looking for something like this :

Minimum Date of Foreign Inflation(Field called For_InflRate of a currency pair with a value ie. the minimum start date with a value.

The same for Exchange Rate(field called XRate) and Domestic Inflation(field called Dom_InflRate).

Regards

henrikalmen
Specialist II
Specialist II

You'll have to check if CurrencyPair has a value, for example by using len(trim(CurrencyPair))>0 in a where-clause. And instead of load CurrencyPair in my examle you should load min(Date) over the dimension For_InflRate and the other fields. Depending on what you want to do with that you could set a flag in your table to indicate what row has the minimum value, or you could create a table with those values (if so, you should look up how to use Concat() in your load script.