Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
blunckc1
Creator
Creator

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
kaushiknsolanki
MVP & Luminary
MVP & Luminary

Hi,

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

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


Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

8 Replies
vinieme12
Champion II
Champion II

How is your variable vYearMonth defined?

vinieme12
Champion II
Champion II

Also Your MonthYear field looks to be text values

blunckc1
Creator
Creator

Defined as follows through the Variable Interface screen:

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

MonthYear is from the Master Calendar.

chanin7893
Partner
Partner

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
Creator
Creator

No luck unfortunately.  Thanks for replying.

kaushiknsolanki
MVP & Luminary
MVP & Luminary

Hi,

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

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


Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

blunckc1
Creator
Creator

Thank you!!!!

kaushiknsolanki
MVP & Luminary
MVP & Luminary

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

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".