Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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