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: 
Not applicable

Creating Variable

Hiii To All,

I m creating one variable:

LET $LastPrice=Tax+[Unit Price];

M adding Tax and Unit Price but m getting string as it is in my straight table.its not evaluating the expression.

Thanx & Regards,

Qliker.

17 Replies
MK_QSL
MVP
MVP

Create Variable as below

eLastPrice=SUM(Tax)+SUM([Unit Price])


now use

=$(eLastPrice)

Not applicable
Author

I have tried like this bro but again m getting double value.

mangalsk
Creator III
Creator III

Hello,


LOAD * Inline

[

Tax,Unit Price

100,200

];

LET $LastPrice='Tax+[Unit Price]'

This is example script and in chart just do

=$($LastPrice)

Anil_Babu_Samineni

Omno,

Without quotes how to use LET from scripting?

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
Anil_Babu_Samineni

Abhishek,

Simple use your Dimension and create one variable like

LET Sample = 'Gross + Salary';

Then create chart with that dim and use this expression $(Sample)

-- Anil

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

M using without quotes nd its working.

Anil_Babu_Samineni

Check your Variables (Ctrl + alt + v) then see, is that variable in created overthere. If yes, Cool ..

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