Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pre-Define Dimesion Group Settings within Load Script?

Hi Qlikkies,

Just a general inquiry from my side.

Is it possible to Pre-Define Dimesion Group Settings within Load Script?

To illustrate:

We have an IF statement in the load script defining alot of settings based on different initial values.

We have 2 entities with different Year measurements one being a calendar year and the other financial year for example.

We use this as a "Time" group in a dimension.

Therefore:

IF '$(vName)' = 'pse' THEN
let vFolderSourceData = 'C:\QlikView\Data FilesPSEMAS\';
let vStartPer = '01/04/2012';
let vStart = '201204';
let vEndPer = '30/06/2016';
let vEnd = '201606';
let vSchemePeriod = '0006201204';
let vCalendarYear = '=FinYearPsemas' ;
ELSE
let vFolderSourceData = 'C:\QlikView\Data Files\';
let vStartPer = '01/01/2012';
let vStart = '201201';
let vEndPer = '30/06/2016';
let vEnd = '201606';
let vSchemePeriod = '0001201201';
let vCalendarYear = '=Year' ;
END IF  

============================================================================================

So what i want to know is how to in the script above achieve the changes shown below:

 

IF '$(vName)' = 'pse' THEN

image1.png

ELSE

image2.png

END IF  

Your soonest replies would be greatly appreciated.

Thank you!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Click on the 'expression' from the drop-down and write your expression there like:

=If (vName='pse', FinYearPsemas, Year)

Untitled.png

View solution in original post

6 Replies
tresesco
MVP
MVP

Not sure if understood right. You may create two groups like time1  and time2 and then while use then in chart, use conditional dimension like:

Untitled.png

Gysbert_Wassenaar

Is it possible to Pre-Define Dimesion Group Settings within Load Script?

No, but you can use expressions to create calculated dimensions to use in your group.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you gentleman for your replies. Found it most enlightening.

Now 1 more question on a similar basis.

Would it be possible either in load script or in conditional (Though in a list box i dont see a conditional) to pre-define The FIELD Namely in below FinYearPsemas  :

image3.png

To change based on the 'pse' variable in previous post to the below specifically on a list box object:

image4.png

Your insights are welcome.

Regards,

Heinrich

tresesco
MVP
MVP

Click on the 'expression' from the drop-down and write your expression there like:

=If (vName='pse', FinYearPsemas, Year)

Untitled.png

Not applicable
Author

Your experience is well appreciated.

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post) and Helpful Answers (found under the Actions menu under every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!