Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Script run on one QFV but unable run on another QVF

Hi All

I face a very funny issue. That is I have create a new QVF , and this new QVF is read the same QVW file.

my existing QVF can display all my script from QVW. 

But my new QVF unable display some of the  expression . 

Paul Yeo

1 Solution

Accepted Solutions
Vegar
MVP
MVP

I've looked at your apps, and it is really strange. I did some investigation and it seems like it is the  sales modifier inside the month modifier that is the issue. 

=num(Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month={"<=$(=Max({<sales = {'*'}, year = {$(=Max(year))}>}month))"},eXP={eXP}>}Amount*1)/1/1000, SOURCE)))

There been some back an forth with set modifiers and single and double quotes during the past couple of releases. And as of june 2019 are handeling apps created in earlier releases with their set analysis syntax rules and apps created in june 2019 with june logic. Read more here KPI's are not displaying data after app is imported into a new environment without data and Set Analysis not working as expected using single quotes in Qlik Sense

Can you cconfirm that the first application is created in an earlier release than the release you are working on at the moment?

clipboard_image_0.png

You can try to change the expression to this:

=num(Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month={"<=$(=Max({<sales = {[*]}, year = {$(=Max(year))}>}month))"},eXP={eXP}>}Amount*1)/1/1000, SOURCE)))

 

View solution in original post

13 Replies
Vegar
MVP
MVP

I do not really understand  where your issue lies. Are you reading QlikView qvw files binary or are you reading the meta data of qvw files? 

Do you have issues with the script execution or is it the objects and dimension and measures that are causing your issues?

 

In general I would say that you need to:

1. Check your LIBs, have you replicated the LIBs in the original QVF in the new application? 

2. Check if you are using variables in your application that is not declared by the script. Variables that have been declared manually in the original application, but not in the new one.

I hope that one of these two tips could be of help.

-Vegar

paulyeo11
Master
Master
Author

Hello , appreciate very for your sharing.

I do not understand what you mean by lib ? Are you refer to extensions ? If yes both have same extensions.

I don’t use variable, I just copy the expression from QVW Paste at QVF .

I am still struggle

Paul
Vegar
MVP
MVP

Where lies the issue? Are you able to load the script? Do you get data into your application?

paulyeo11
Master
Master
Author

Hi Sir

I am able to reload script for both old and new QVF , no error.

Same expression I paste on Old QVF it can display value , but paste on New QVF , it keep disply 0.

Paul
Vegar
MVP
MVP

Does the expression consist of any variables?

 

Can you share the expression that you are using?

paulyeo11
Master
Master
Author

Hi Sir

Below is the expression  which display 0 on my new QVF :-

=num(Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month={"<=$(=Max({<sales = {'*'}, year = {$(=Max(year))}>}month))"},eXP={eXP}>}Amount*1)/1/1000, SOURCE)))

if i am using simple expression like below not issue :-

sum({$<LY_YTD = {'-1'} ,SOURCE={"TDSS"}, eXP={eXP}>}Amount)

Only those expression have Aggr have issue.

Paul Yeo

paulyeo11
Master
Master
Author

Hi Sir

The expression does not have variable .

Paul
paulyeo11
Master
Master
Author

Hi Sir

Enclosed my QVW and QVF.

isdn.qvf is new file

TDS ver033.QVF is old file

Hope you can help to take a look

Paul

Vegar
MVP
MVP

I notice that. It sounds really strange.

You have checked that all fields in the expression are included into the script of the new QVF? 

Are you running the complete identical script in the new app? 

Are you using the same Qlik Sense versions for the two apps?

You could try to use your original QVF as a source for the second one using binary load and check if your expression is working?