Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP 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
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

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

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


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

8 Replies
vinieme12
Champion III
Champion III

How is your variable vYearMonth defined?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

Also Your MonthYear field looks to be text values

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
blunckc1
Creator
Creator
Author

Defined as follows through the Variable Interface screen:

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

MonthYear is from the Master Calendar.

chanin7893
Partner - Contributor III
Partner - Contributor III

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
Author

No luck unfortunately.  Thanks for replying.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

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

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


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
blunckc1
Creator
Creator
Author

Thank you!!!!

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!