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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression in the script.

Hi all,

I would like to create expression with Set Analysis directly in load script.

I create dataIsland but it doesn't work !!

Exmple:

LOAD,

Field1 ,

Sum({$<Année={$(=Max(Année))}>} Ventes) as SalesY,

Sum({$<Année={$(=Max(Année)-1)}>} Ventes) as SalesLY,

Sum({$<Année={$(=Max(Année))}>} Ventes) / Sum({$<Année={$(=Max(Année))}>} Marge) as Expr,

Fields2,

... RESIDENT Table

How can I create the Set Analysis Expression in the script with Table Sales (Sales field) and Table Store (Store)

Tables Sales:

LOAD * , Sales FROM SALES;

LOAD *, SalesNet FROM SALES;

LOAD *, Store FROM STORE;

Expressions:

LOAD

*,

IF(

Sum({$<Year={$(=Max(Year))}, Store={'A','B'}>} Sales) > Sum({$<Year={$(=Max(Year))}, Store={'A','B'}>} SalesNet)

, 'Visible', 'Unvisible')

     )

, ....

RESIDENT TABLE

It is possible to obtain this ?

Thanks for your help.

Labels (1)
1 Reply
qlikpahadi07
Specialist
Specialist

I don't think you can use Set Analysis in Script but you can use multiple if conditions aggregate functions with Group by Statements.

But this will make your Script quite Complex