Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out 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

Labels (1)
15 Replies
Anonymous
Not applicable
Author

They either give a blank text object or an expression error is displayed on the text object.

sunny_talwar
MVP
MVP

Try this

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

MK9885
Master II
Master II

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

Maybe use ' ' ??

Whats the use of creating a variable in script when you can do it in front end, easier to modify too

sunny_talwar
MVP
MVP

Give this a short

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

Anonymous
Not applicable
Author

This worked!! Thank you!

sunny_talwar
MVP
MVP

Used the same logic from what was given by Stefan here

Expression as a variable with $-sign expansion