Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

Load expressions from Excel and use in chart

Dear All,

I have excel sheet with expressions I want to load multiple expressions from excel in qlikview and use this expression multiple

charts it is giving error.

Please guide me how to use the same

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
5 Replies
fvelascog72
Partner - Specialist
Partner - Specialist

Try this:

for i = 0 to NoOfRows('Exp_Test')-1

let vName   = peek('Exp_Name', i, 'Exp_Test');   // Name of the variable

let vNumber = peek('ExpID', i, 'Exp_Test'); // Number of the variable

next i

let i = null();

let vName = null();

vikasmahajan
Author

after reload how to use the same in chart ?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
satishkurra
Specialist II
Specialist II

Let's say your expression is Sum(Sales) in your excel and give some label as Sales $ and your variable name in chart expression should contain $(Sales)

Thanks

Example:

In excel file:

SET Sales=Sum(Sales)

In chart expressions, the label can be Sales $ and expression is $(Sales). That means $(variablename)

vikasmahajan
Author

Your Script worked for me , Now I want to store all id with expressions and use in chart using $.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
satishkurra
Specialist II
Specialist II

2 Approcahes

1. Use a for loop for all your ID's and call them in EDIT Script

2. Simple way is create all your expressions in notepad file as below

SET Sales=Sum(Sales);

SET Sales1=Avg(Sales);

SET Sales2=Min(Sales);

Put all the above statements in notepad file and create an include statement and in your chart expressions use

$(Sales),$(Sales1) and $(Sales2)

Thanks

Satish