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: 
jcharles
Contributor III
Contributor III

Set Analysis - Replace a known with a variable


Good day

I have the following set analysis that works:

COUNT({$<[REPORTED MONTH]={"Jul 2014"}>CASEID)

I have a variable that is as follows:

vCurrentMonth               =Monthname(today())

I want to replace "Jul 2014" with vCurrentMonth but when I do then the table shows no figures.

Please help.

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

There are many things that can go wrong here, but the following should work:

  • Make sure that [REPORTED MONTH] is a dual field - created with MonthName() in the script.
  • Use Count({$<[REPORTED MONTH]={'$(vCurrentMonth)'}> CASEID)

HIC

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

The sysntax is this:


COUNT({$<[REPORTED MONTH]={$(vCurrentMonth)}>CASEID)


but I think it will not work because you need a format MMM YYYY while Monthname(today()) returns MMM


Insert the variable in a text box and verify its value


Let me know

hic
Former Employee
Former Employee

There are many things that can go wrong here, but the following should work:

  • Make sure that [REPORTED MONTH] is a dual field - created with MonthName() in the script.
  • Use Count({$<[REPORTED MONTH]={'$(vCurrentMonth)'}> CASEID)

HIC

jcharles
Contributor III
Contributor III
Author

Thank you