Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qlik_Maestro
Contributor III
Contributor III

Set Analysis Evaluation Discrepancy between verision 11.2 and 12.4

Hello All,

In an effort to upgrade from 11.2 SR7 to the latest 12.4 we are seeing a discrepancy in the way certain set analysis expressions are executed. The expression below works perfectly in 11.2 but gives null in 12.4. We have tried to break down each part of the expression to its individual parts and they seem to be evaluating identically up until the point where they are put together.

Any ideas what changed in the newest version so that we can better identify places we need to make changes? We thought it could be something to do with the way the 12.4 handles quotations differently but that is not the reason for this particular example. I also couldn't find release notes about this. Any help would be much appreciated!

 

=Max({$<[SourceDate_1] = {'<=$(=Monthend(AddMonths(GetFieldSelections([SourceDate_2]),-1)))'}>} [SourceDate_1])

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Try this

=Max({$<[SourceDate_1] = {"<=$(=Date(Floor(MonthEnd(Max([SourceDate_2]), -1))))"}>} [SourceDate_1])

or this

=Max({$<[SourceDate_1] = {"<=$(=Date(Floor(MonthEnd(Max([SourceDate_2]), -1)), 'SpecifyDateFieldFormatHere'))"}>} [SourceDate_1])

 

View solution in original post

8 Replies
sunny_talwar

Try replacing single quotes with double quotes and see if that works (Quotes in Set-Analysis)

=Max({$<[SourceDate_1] = {"<=$(=Monthend(AddMonths(GetFieldSelections([SourceDate_2]),-1)))"}>} [SourceDate_1])

 

qlik_Maestro
Contributor III
Contributor III
Author

The quotes are not the problem here. Even if I do that or use the backwards compatibility script it is still null in v12.4

sunny_talwar

Try this

=Max({$<[SourceDate_1] = {"<=$(=Date(Floor(MonthEnd(Max([SourceDate_2]), -1))))"}>} [SourceDate_1])

or this

=Max({$<[SourceDate_1] = {"<=$(=Date(Floor(MonthEnd(Max([SourceDate_2]), -1)), 'SpecifyDateFieldFormatHere'))"}>} [SourceDate_1])

 

qlik_Maestro
Contributor III
Contributor III
Author

While the second one was the solution to the issue, does anyone know the underlying reason behind this? Is there a change in the behavior of dates with the newest version? It did seem like there was when we investigated some of our QVDs the formatting had changed.

sunny_talwar

Did you change the environmental variables within the qvd generators? @hic might be able to answer this better

qlik_Maestro
Contributor III
Contributor III
Author

There were no changes made between the qvd generators.

sunny_talwar

In that case, I am not really sure.

Brett_Bleess
Former Employee
Former Employee

Should be related to the following Design Blog post I believe, quote changes...  I am not sure if I missed something else or not, but things were tightened up in Set Analysis a lot from where you were to where you moved...  This is why you wan to be sure to read the Release Notes docs for each interim major point release you jump to get the changes between releases...

https://community.qlik.com/t5/Qlik-Design-Blog/Quotes-in-Set-Analysis/ba-p/1471824

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.