Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
janvandernagel
Contributor III
Contributor III

Evaluating Variable

Hello,

I'm trying to use 2 variables:

let vPriorMonth  = '=month(addmonths(max(Date),-1))';

let vPriorMonthYear = '=Year(addmonths(max(Date),-1))';

I can call vPriorMonthYear with:  ' = $(vPriorMonthYear)'

But when I try the same wiht vPriorMonth (' = $(vPriorMonthYear)') I get no result.

But when I use '=(vPriorMonth)' is it working fine. Why isn't it working when using the$?

Can anyone help me?

Thanks

Jan

3 Replies
Chanty4u
MVP
MVP

you can check here

The Magic of Variables

Anil_Babu_Samineni

Can you share full variable using SET and LET.. Perhaps this?

=$(=vPriorMonthYear)

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
janvandernagel
Contributor III
Contributor III
Author

Thanks for your reply.

I've read the article but still do not understand why the 2 variables I use, wich are almost the same, do not behave the same. vPriorMonthYear is working in both ways and vPriorMonth only without the $ sign? I.e.:

= $(vPriorMonthYear)  =>2018

= $(vPriorMonth)         => -

= (vPriorMonthYear)  => 2018

=( vPriorMonth)         => apr

Thanks in advance for trying to explane.