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

Read a variable in an inline

Hi


I have the following problem.


In a simple table expression I am reading a variable that in turn reads a field generated in inline.


The expression generated by the inline is as follows:


Expression1: sum ({<Year = {'$ (vLastYear)'}>} Sales)


Then I generate a variable that is equal to "Expression1" and that variable places it in a straight table. It returns me a good result but without considering the previous year, I consider the current year.


Thank you


5 Replies
Gysbert_Wassenaar

I don't understand the question. Can you post a small qlikview document that explains what you want?


talk is cheap, supply exceeds demand
Anil_Babu_Samineni

Hi, Try like below from script level. this is as i assume

1) LET vLastYear = Max(Year)-1;

2) LET vFinal = sum ({<Year = {'$ (vLastYear)'}>} Sales)


Then use =$(vFinal) and use text object then see


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Hello

Thanks for answering.


I leave you a file with my problem. Thanks for the help.

The problem is that "Sales 2" does not display the same as "Sales 1". This is because when you read a variable in an inline, it does not read it.

1.jpg

The tables must show the same result

Thank you

Not applicable
Author

Thanks for the answer But it does not serve me what you indicate.

Thanks.