Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Generating new dimension and values according to the folders paths

Hello everyone!

Is it possible to generate new dimension and values according to the folders paths?

My load script has this structure:

ScreenShot061.jpg

What I looking for: for example, if the data is coming from the folder 'Brand 1', I'd get a new dimension with the 'Brand 1' value. And, if it's coming from the folder 'Brand 2', I'd get the 'Brand 2' value in the new dimension. And so on.

And finally, I'd get a table like this:

ScreenShot062.jpg

Can someone share the solution with me?

Thanks in advanced!

1 Solution

Accepted Solutions
anbu1984
Honored Contributor III

Re: Generating new dimension and values according to the folders paths

for each vFolder ...

NewDim:

Load

$(vFolder) As NewDimension

From

[$(vFolder)...]

....

where RowNo() < 1;

7 Replies
anbu1984
Honored Contributor III

Re: Generating new dimension and values according to the folders paths

for each vFolder ...

NewDim:

Load

$(vFolder) As NewDimension

From

[$(vFolder)...]

....

where RowNo() < 1;

Not applicable

Re: Generating new dimension and values according to the folders paths

Hi, Anbu

I've already tried it.

It doesn't work, because creates only one value.

Tks

s_kunte23
Contributor III

Re: Generating new dimension and values according to the folders paths

you are missing the next statement below the execution of the load statement?!

MVP
MVP

Re: Re: Generating new dimension and values according to the folders paths

Stefan answer seems ok

for each vFolder in 'Brand 1', 'Brand 2'

  NewDim:

  Load

  '$(vFolder)' As NewDimension

  AutoGenerate 1;

next;

1.png

Not applicable

Re: Generating new dimension and values according to the folders paths

Oh, that's right

I've missed the next statement.

It works!

Thanks!

Not applicable

Re: Generating new dimension and values according to the folders paths

You're right, Stefan

I've missed it.

thanks!

Not applicable

Re: Generating new dimension and values according to the folders paths

You're righ, Massimo

I've missed. Now works fine.

tks!

Community Browser