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

Quotes in Set Analysis change in behavior - "error in expression"

Hello All,

I got deployed all my dashboard to new Qlikview server, this change has been impacted all my set analyais. Now all my dashboard script is impacted, Charts showing no values.

Suggested Resolution: The fix for the issue is relatively simple, replace the ‘ with “ in your script IF you are impacted.

As per their requtest i have change the set analysis its not working for me, could some one suggest me where should i update the change.

Variable -- vMonth = =if(len(GetCurrentSelections()),max(MonthYear),MonthStart(Today()))

Set Analaysis: if(ELE_VALUE = 'MON',Num(MaxString({}FCT_ACT),'$###,###.00')&'', if(ELE_VALUE = 'PCT',Num(MaxString({}FCT_ACTL)*100,'##.0%'&' ')&'', if(ELE_VALUE= 'QTY',Num(MaxString({}FCT_ACT),',###,###.')))) Can some one suggest me where should i update the change. Thanks in Advance NR

2 Replies
Brett_Bleess
Former Employee
Former Employee

The following Design Blog post should assist you in getting things sorted:

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

Here is the base URL in case you wish to search for additional items on your own:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

This was also covered in the Release Notes in the version things changed, it was 12.20 track, here is the text from there too:

Quotes in Set Analysis expressions With QlikView November 2017, the logic for how Set Analysis expressions are evaluated has changed. Strings enclosed in single quotes are now treated as literals and not as searches. This change makes the software behave in a more stringent way:

- Single quotes imply a case sensitive literal match with a single field value. Wild cards are not allowed.

- Double quotes imply a case insensitive search for field values. Wild cards are allowed.

Following this change, some searches will return different result sets compared to previously:

• Wild cards, numeric searches and expression searches. Asterisks and question marks enclosed by single quotes will no longer be regarded as wild cards. If an asterisk should be interpreted as a wild card, the search must instead be written with double quotes. Numeric searches using relational operators and expression searches using equals signs will not work with single quotes. This is an example of how an expression should be written to be regarded as a search:

Sum( {$<Country = {"Austr*"}>} Sales)

Sum( {$<Year = {">=2013"}>} Sales)

Sum( {$<Customer = {"=Sum(Sales)>100000"}>} Sales) • Case sensitivity. Expressions with single quotes are now case sensitive. 

The change only affects documents created with the November 2017 release or later. It does not affect documents created with earlier versions, even if these documents are edited by the November 2017 release or later. Should you want to force the new behavior for all documents, you can change the Settings.ini file (both for Server and Desktop) under the [Settings 7] tag. Introduce the following parameter:

EnableSingleQuoteExactSearch=2

If the previous parameter is missing or assigned 1, you can force individual documents to behave either as an old or a new document by adding the below setting as one of the first lines in the script:

///$sqs new Forces the document to adopt the new behavior.

///$sqs old Forces the document to adopt the old behavior.

Finally, the Governance dashboard has been updated to facilitate a search for expressions that are potentially affected by the above change

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.
NavinReddy
Creator II
Creator II
Author

HI @Brett_Bleess  Thanks for your reply

i have tried with suggested changes its not working for me, could you please suggest me where am i doing wrong.


=if(ELE_VALUE = 'MON',Num(MaxString({<Month=,MonthYear={"$(=Date($(vMonth),'MMM YY'))"}>}FCT_ACTL),'$###,###.00')&'',
if(ELE_VALUE = 'PCT',Num(MaxString({<Month=,MonthYear={"$(=Date($(vMonth),'MMM YY'))"}>}FCT_ACTL)*100,'##.0%'&' ')&'',
if(ELE_VALUE= 'QTY',Num(MaxString({<Month=,MonthYear={"$(=Date($(vMonth),'MMM YY'))"}>}FCT_ACTL),',###,###.'))))

Thanks in Advance

NR