Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
blunckc1
Not applicable

Set analysis in QlikSense - variable help

Hi everyone,

I am transitioning a dashboard from QlikView to QlikSense and a set analysis expression that works perfectly fine in QlikView is not working at all in QlikSense.

Here is the expression from QlikView:

Count({<MonthYear ={">=$(=date(addmonths(date#('$(vYearMonth)','MMM-YYYY'),-11),'MMM-YYYY')) <=$(=date#('$(vYearMonth)','MMM-YYYY'))"}, Year=,Month=>} DISTINCT(ows_ID))

Can someone please help in getting this to work in QlikSense?

Data models between QlikView and QlikSense are exactly the same and the variable is declaring the correct value so I am stumped!!

Thanks in advance

Carl

1 Solution

Accepted Solutions
kaushik_solanki
Not applicable

Re: Set analysis in QlikSense - variable help

Hi,

Make sure you have '=' sign in variable definition.

=date(max(MonthYear),'MMM-YYYY')


Regards,

Kaushik Solanki

8 Replies
vinieme12
Not applicable

Re: Set analysis in QlikSense - variable help

How is your variable vYearMonth defined?

vinieme12
Not applicable

Re: Set analysis in QlikSense - variable help

Also Your MonthYear field looks to be text values

blunckc1
Not applicable

Re: Set analysis in QlikSense - variable help

Defined as follows through the Variable Interface screen:

date(max(MonthYear),'MMM-YYYY')

MonthYear is from the Master Calendar.

chanin7893
Not applicable

Re: Set analysis in QlikSense - variable help

Count({<MonthYear ={">=$(=date(addmonths(date#("$(vYearMonth)",'MMM-YYYY'),-11),'MMM-YYYY')) <=$(=date#("$(vYearMonth)",'MMM-YYYY'))"}, Year=,Month=>} DISTINCT(ows_ID))

Just Try This code . I have just changed the single quotes into "Double quotes". This should probably work. Also make sure the vYearMonth variable is defined.

blunckc1
Not applicable

Re: Set analysis in QlikSense - variable help

No luck unfortunately.  Thanks for replying.

kaushik_solanki
Not applicable

Re: Set analysis in QlikSense - variable help

Hi,

Make sure you have '=' sign in variable definition.

=date(max(MonthYear),'MMM-YYYY')


Regards,

Kaushik Solanki

blunckc1
Not applicable

Re: Set analysis in QlikSense - variable help

Thank you!!!!

kaushik_solanki
Not applicable

Re: Set analysis in QlikSense - variable help

Pleasure.

Also keep in mind that whenever you go to variable definition and close that with or without doing changes, the '=' sign gets removed automatically, so make sure in such cases you check if the sign is there or not.

Regards,

Kaushik Solanki