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

Dynamic File path

Hello,

I want QlikView to use the file path based on the location of the QV file. I have a large volume of identical folders on various servers that collect reporting data for multiple inventory items, categorically separated. The file name of the report will be the same in each folder, essentially static. The only change will be the path to the file, essentially dynamic. I want the QV file to load the static file from the dynamic path it is located. My resolve will be to drop a copy of the QV file into each report folder. I will later work on an index that will make this an easier process but for now a solution for the above will work.

Here is what I'm using to load multiple sheets from an single excel database. What format does [...inventory report.xlsx] need to be in to accomplish this?

 

Data:
LOAD Store,
Location,
Year,
Month,
Category,
Subcategory,
Volume


FROM
[...inventory report.xlsx]
(
ooxml, embedded labels, table is Volumes);


Concatenate(Data)
Load  Year,

Store,
Month,
Location

From
[...inventory report.xlsx]
(
ooxml,embedded labels, table is Rack);

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

If the Excel doc will be in a subfolder:

from [.\FolderName\inventory report.xlsx]

View solution in original post

5 Replies
jonvitale
Creator III
Creator III

This is how I do it:

let path = 'lib//myConnection/myPath';

...

FROM [$(path)/theRestOfMyPath/theFilename.QVD]

m_woolf
Master II
Master II

If the Excel doc will be in a subfolder:

from [.\FolderName\inventory report.xlsx]

kevincagle
Contributor III
Contributor III
Author

Is THEN part of the syntax or a statement? Im fairly new to the Qlik language/syntax but familiar with others.

let path = 'lib//myConnection/myPath';

FROM [$(path)/theRestOfMyPath/theFilename.QVD]

or

let path = 'lib//myConnection/myPath';

THEN

FROM [$(path)/theRestOfMyPath/theFilename.QVD]

jonvitale
Creator III
Creator III

The former,

Sorry, I should have used color coding. The "then" was just part of my explanation, not Qlik code.