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: 
nareshthavidishetty
Creator III
Creator III

set analysis date variable

Hi,

I need to add a date variable instead of Date Extract.

sum({$<[Month Abbr]=, Year=, [Quarter Name]=, [Calendar Date]={'>$(=AddMonths(max([Date Extract]),-1))<=$(=max([Date Extract]))'}>}[# QN Open])

Date variable:

v_Caldate = date([Calendar Date],'DD-MM-YYYY')

Thanks...

3 Replies
jyothish8807
Master II
Master II

Try like this:

sum({$<[Month Abbr]=, Year=, [Quarter Name]=, [Calendar Date]={'>$(=AddMonths(date(max(v_Caldate),'DD-MM-YYYY'),-1))<=$(=date(max(v_Caldate),'DD-MM-YYYY'))'}>}[# QN Open])


Just check the brackets.


Br,

KC

Best Regards,
KC
Anil_Babu_Samineni

I think, this deserve?

sum({$<[Month Abbr]=, Year=, [Quarter Name]=, [Calendar Date]={'>$(=Date(AddMonths(max($(v_Caldate)),-1),'Your Format'))<=$(=Date(max($(v_Caldate)),'Your Format'))'}>}[# QN Open])

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
shiveshsingh
Master
Master

You need to replace your Date Extract with

$(v_Caldate)