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

Weird Error with a Let statement?

So when I use this expression in a text sheet object it works fine, I get the value that is displayed and I have confirmed it works correctly.

But I started using it a lot so i decided to make a let expression for it. When i put it in a let statement the compiler gets angry and it has the red underline and says unknown error

//Morning INV

Let MorningINV= Sum({<DDGDayStart={'$(vToday)'}>}[DDG Inventory]);

error.PNG

1 Solution

Accepted Solutions
sunny_talwar

Give this a short

LET MorningINV = 'Sum({<DDGDayStart = {"$' & '(vToday)"}>}[DDG Inventory])';

View solution in original post

15 Replies
sunny_talwar

ali_hijazi
Partner - Master II
Partner - Master II

use set instead of let

I can walk on water when it freezes
Anonymous
Not applicable
Author

Set is for Strings not expressions.

vishsaggi
Champion III
Champion III

You can use $ sign expansion to evaluate the expression using SET. Did you try like

SET MorningINV= Sum({<DDGDayStart={'$(vToday)'}>}[DDG Inventory]);

= $(MorningINV)

Anonymous
Not applicable
Author

This is like half a solution... Thank you, i got a number but it is an incorrect number

sunny_talwar

Don't want to try what is suggested in the attached links?

Anonymous
Not applicable
Author

ive been reading them but all of the proposed solutions arent working.

sunny_talwar

As in they give errors or they run but not the correct number?

vishsaggi
Champion III
Champion III

Ok. Can you share some sample data or file and your expected output?