Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
Wlad_Masi
Employee
Employee

Inline load is a type of data load that can be used when you do not have a data source. The data can be entered manually or by using the wizard within QlikView or Qlik Sense.

Here are a couple of key things to remember:

  • Data entered through an inline clause must be enclosed by square brackets [ ]
  • The columns of the table are defined in the first line of the inline load statement, separated by comas.
  • A semi colon (;) is required after the closing square bracket


Here is an example of a simple table using inline load:

Load * Inline [

ID, Name, Age, Title

1, Wladimir, 31, Team Lead

2, Paul, 22, Technical Support Engineer

3, Mark, 40, Customer Support Engineer

4, Janne, 27, IT Specialist

];

 

In the example inline load above, the columns for the table are:

  • ID
  • Name
  • Age
  • Title


The values starting with 1, are all data values that will populate the table. After loading the data, and looking at the data model, it will look like a normal table:

Wlad_Masi_0-1587737439846.png

 

As with any other dataset, two inline load tables can be created and be connected as can be seen below. You can also connect your inline table to an already existing table:

Wlad_Masi_1-1587737439848.png



Inline load using the QlikView wizard:

You can accomplish the same result using the QlikView Inline load wizard.
In the edit script window, go to Insert > Load Statement > Load Inline. A window with a structure of a table will appear. Select the top cell indicated by F1 and change its value to the name of your first column. Repeat for the other columns of your inline table. Insert the data to create the table.  At the end, your table should look like this:

Wlad_Masi_2-1587737439854.png

 

 

Inline load using the Qlik Sense wizard:

 In the Data Manager, select the ‘Manual Entry’ option located at the top left corner of the screen.

Add the table name and double click on Field_1 cell to insert your first column name. Repeat this for the other columns. After naming all the columns, you should have something like in the image below.
Note that at the bottom right you can see the column count = 4 and number of rows = 0. If you Insert data, you see that the number of rows is no longer 0.

Wlad_Masi_3-1587737439857.png

 

For more detail information on using the Qlik Sense Wizard, please see the following resources:

Manual Entry - Qlik Sense
Inline load Delimiter


Please give this post a like if you found it helpful! Also please let us know if you have any questions or leave your feedback in the comments.

12 Comments
chriscammers
Partner - Specialist
Partner - Specialist

I see it now.

The expression you have written would work in a chart but not in a load script. You'd have to run the Sum into a table and then assign the value of the field to a variable. and then use the variable in your inline load.

 

BTW We should probably move this to the community forums rather then the support blog

 

Have a great day

0 Likes
141 Views
Huberto
Creator
Creator

Hi @AgustinaGonzalez,

Maybe this code sample can help you with your issue or give you some ideas.

 

Data:
LOAD * INLINE [
	Almacen destino,	Peso Neto
    BUQUE GENERICO,		10
    BARCAZA,			20
];

SET vHOLA1 = Sum( {$< [Almacen destino] = {'BUQUE GENERICO'} >} [Peso Neto]);
LET vHOLA1 = Replace(vHOLA1, '@', '$');

SET vHOLA2 = Sum( {@< [Almacen destino] = {'BARCAZA'} >} [Peso Neto]);
LET vHOLA2 = Replace(vHOLA2, '@', '$');

Measures:
LOAD
	MeasureID,
    MeasureLabel,
    Replace(MeasureExpression, '@', '$') as MeasureExpression;
LOAD * INLINE [
	MeasureID,	MeasureLabel,	MeasureExpression
	1,			Measure 1,		"@(vHOLA1)"
	2,			Measure 2,		"@(vHOLA2)"

]

 

 

To visualize the result, follow the steps:

  1. Create a Filter Panel object:
    1. Dimension: MeasureLabel
  2. Create a table object.
  3. Add the measure 1:
    1. Expression: =$(=FirstSortedValue([MeasureExpression], [MeasureID], 1))
    2. Label: =FirstSortedValue([MeasureLabel], [MeasureID], 1)
    3. Show if condition: GetSelectedCount([MeasureLabel]) >= 1
  4. Add the measure 2:
    1. Expression: =$(=FirstSortedValue([MeasureExpression], [MeasureID], 2))
    2. Label: =FirstSortedValue([MeasureLabel], [MeasureID], 2)
    3. Show if condition: GetSelectedCount([MeasureLabel]) >=2
  5. Enable the visualization only if
    1. Condition: GetSelectedCount([MeasureLabel]) >= 1
    2. Message: ='◄ Select at least one measure on the left.'

Result when one measure is selected.

Huberto_2-1717620618083.png

 

Result when two measures are selected.

Huberto_1-1717620458805.png

 

Note: Using the $ in the script will cause your variable to be expanded during the reload, but I believe you want to keep them as defined in the script to be used on the interface. That's why I do the trick with @.

Some useful documentation:

https://community.qlik.com/t5/Design/The-Little-Equals-Sign/ba-p/1475639

https://community.qlik.com/t5/Design/The-Magic-of-Variables/ba-p/1465499

https://community.qlik.com/t5/Design/The-Magic-of-Dollar-Expansions/ba-p/1471979

 

By the way, I agree with @chriscammers regarding the Qlik Community forum to address such questions.

I hope it helps.

Regards,

Huberto

0 Likes
126 Views