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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can I set the contents of a field into a variable ?

Hi All

I am new to QlikView, I am trying to set the contents of a field into a variable and use that variable to derive another field.

The problem is that I need to use information from 2 different tables to create a new table but RESIDENT can only be used once.

Any suggestions will be greatly appreciated!

Thanks

Vaneshan Naidoo

5 Replies
Not applicable
Author

Hi Vaneshan,

Can you elaborate your requirement with an example?

Thanks

Sabal

Not applicable
Author

Hi Sabal

Sure.

I have this scenario :

REVENUE:

load

  'Month' as gatype,

  [Device],

    DSlice1 as DateSlice,

    sum([Revenue]) as Revenue,

    count(distinct idOrder) as OrderCount,

    count(distinct idCustomer) as BuyerCount,

    count(distinct if(DSlice1 = NewInYM,idCustomer)) as NewBuyerCount

resident TMP

  group by Device, DSlice1;

I would like yo store the field "Revenue" into a variable call vRev.

Can this be done?

Not applicable
Author

Hi Vaneshan,

Firstly you can store only single value in a variable.

Secondly what is your requirement to store Revenue value into a variable?

Thanks

Sabal

Not applicable
Author

Hi Sabal

Thanks I solved my problem in the front end of QlikView.

Not applicable
Author

Great