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: 
Jim_Ogilvie
Contributor II
Contributor II

Chart-Level Script - Add Load

Hi guys,

So, after the impressive Qlik in 60 video on Chart-Level scripting, I thought I'd jump right in and experiment a little.

There isn't much in the way of walkthrough demos, so I've been using Qlik's developer guide to try a few things out.

I'm have trouble at the first hurdle, with the seemly simple task of adding some new data to that already loaded in the bar chart object I'm working with. I keep getting a "Unexpected Dynamic Script Error".

Here's my code:

Add Load
x as Year,
y as [Sales Amount]
Inline
[
Year,SalesAmount
2023,10000000
2024,20000000
]
;

 

And here's the code from the Qlik documentation:

Add Load
x as Dates,
y as Sales
Inline
[
Dates,Sales
2001/09/1,1000
2001/09/10,-300
]

Labels (1)
1 Solution

Accepted Solutions
Andrew_Delaney
Support
Support

Hi Jim,

 

It looks like the code you are basing this off is unfortunately wrong.

 

Sense is looking for x and y in your inline data and failing to find it.

 

So what you are after here is:

 

Add Load
x as Year,
y as [Sales Amount]
Inline
[
x,y
2023,10000000
2024,20000000
]
;

 

Which will load into your data model 2 fields named Year and Sales Amount with the values you have put in place

View solution in original post

1 Reply
Andrew_Delaney
Support
Support

Hi Jim,

 

It looks like the code you are basing this off is unfortunately wrong.

 

Sense is looking for x and y in your inline data and failing to find it.

 

So what you are after here is:

 

Add Load
x as Year,
y as [Sales Amount]
Inline
[
x,y
2023,10000000
2024,20000000
]
;

 

Which will load into your data model 2 fields named Year and Sales Amount with the values you have put in place