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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ACCES TO A TABLE

I have a table in my application. The table name is: Bilan_Actif_Exercice_NM1

The statement that creates the table is as follows:


Bilan_Actif_Exercice_NM1:
LOAD AS CodeLigne CL_Actif,
Amount AS MT_Actif_NM1
FROM
Parameter_Files \ Bilan_Actif_Exercice_NM1.xls
(OOXML, embedded labels, table is Exercice_NM1);

I want to get a value in this table.

Applying the following statement:


SET BHn = IF (CL_Actif = 'BH', MT_Actif_NM1);

When I reload the data, the variable BHn does not contain values. I do not know why?

I checked that the table contains the data.

Please help me .

Labels (1)
4 Replies
Not applicable
Author

Is there more than one record where CL_Actif = BH?

If not, then you probably want the Peek statement. I think it would be something like:

Set BHn = Peek(MT_Actif_NM1, Fieldindex('CL_Actif', 'BH'))


If you have more than one value, this would probably give you the first occurence.

Not applicable
Author

Sir NMILLER, it did not work. I have attached my source data file attachment that you try.

Not applicable
Author

I'm unable to open that file. Could you attach a CSV? I'm on Excel 2000, so I can't open the new Excel files.

Not applicable
Author

Figured out the problem, I needed Let and the first parameter of Peek needs quotes:

Let BHn = Peek('MT_Actif_NM1', Fieldindex('CL_Actif', 'BH'))


That's a Friday mistake. Big Smile