Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
arusanah
Creator II
Creator II

set Analysis with Set command

Can we use set analysis in Set command :

set vDateFromUI= addmonths(monthstart(max({$<TimeLine.Year={$(=max(TimeLine.Year))}>}[Date])),-12);
set vDateToUI= addmonths(MonthEnd(max({$<TimeLine.Year={$(=max(TimeLine.Year))}>}[Date])),-1);

when I use these expressions in text object it works fine . but when i am trying to use them for Set or Let .. it fails .

pls help

6 Replies
buzzy996
Master II
Master II

As per my knowledge,NO.

sunny_talwar

You won't be able to use the set analysis in the back end, but I am sure you can assign a expression which include set analysis in the back end. try it this way and see if this works:

LET/SET vDateFromUI= '=addmonths(monthstart(max({$<TimeLine.Year={$(=max(TimeLine.Year))}>}[Date])),-12)';
LET/SET vDateToUI= '=addmonths(MonthEnd(max({$<TimeLine.Year={$(=max(TimeLine.Year))}>}[Date])),-1)';

Not entirely sure if LET or SET will work, but I feel one of them should work.

HTH

Best,

Sunny

arusanah
Creator II
Creator II
Author

I Tried the same expression in text obj it works . and  text objects uses " LET"  . so i think using above expression with Let should work.

sunny_talwar

Ya give it a shot and let me know what worked.

Best,

Sunny

arusanah
Creator II
Creator II
Author

Hi there ,

LET  Works

sunny_talwar

Awesome!