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

Binary load QVW with calendar

I am binary loading a .qvw file which has a calendar in the script (which is brought in using a text file). Within the text file has all the calendar variables and they have all be brought across properly into the app, however the calendar part of it doesn't seem to be updating even though it is updating in the qvw.

To be more precise, there is a variable in the calendar text file which states how many work days there are left in the month. This variable is still saying the same amount of days as there was when I first initially made the connection on the 6th July and saying 20 days left, when it should be 13. 

Is it not possible to use the calendar variables through a text file > qvw > sense? Because the variables are physically there I thought it had worked fine but the fact they are displaying different data is confusing me.

Labels (1)
6 Replies
petter
MVP
MVP

A binary load will not bring over variables from the file it loads from.

You could persist the variables in the original file into a table as a data island and then the table will be brought over and you can have a small routine that extracts the variables from the table and recreate them.

khaycock
Creator
Creator

So even though the variable shows as its there and its generating a number, it's not properly there functionality wise?

petter
MVP
MVP

You might have had it already in your application before doing any binary load.... 

petter
MVP
MVP

A quote from the documentation:

The binary statement is used for loading the data from another Qlik Sense app or QlikView document, including section access data. Other elements of the app are not included, for example, sheets, stories, visualizations, master items or variables.

petter
MVP
MVP

You could also import the variables from the QVW by just reading the XML-part of the QVW and recreating the variables like this after your binary load:

[IMPORTED VARIABLES]:
LOAD
  'SET ' & Name & '= ''' & Replace(RawValue,'''','''''') & '''' AS Var
FROM [SameAppAsForBinaryLoad.qvw] (XmlSimple, Table is [DocumentSummary/VariableDescription])
WHERE IsReserved='false' AND Match(Name,'testv','v1','v2');

vars=Peek('Vars',0,'IMPORTED VARIABLES');
$(vars);      // will execute what is in the string literally
vars=;
DROP TABLE [IMPORTED VARIABLES];

In this way you don't have to persist any variables in the orginal QVW file since they are actually persited in the XML-part of the QVW anyway....

khaycock
Creator
Creator

I've managed to binary load the Qlik Mart.qvw rather than the final dashboard.qvw and then load the calendar text file by itself in the Qlik Sense app script which then imported all of the variables. However I'm now having issues with set analysis statements in a KPI that doesn't seem to want to register the fields from the calendar and the binary load in the same set analysis and I have no idea why. All the fields exist so I have no idea why they wouldn't generate!