Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
souadouert
Specialist
Specialist

set analysis with expression

exp1:

=sum(if(REAL_PACKS.LIB_TYPE_PACK=OBJ_PACK.TYPEPACK and REAL_PACKS.PROD_PACK=1,REAL_PACKS.NOMBRE_PACK))

for exp i want to calculated cumulative Nombre pack, i use this exp

exp2:

=sum({<OBJ_PACK.TYPEPACK={REAL_PACKS.LIB_TYPE_PACK} , REAL_PACKS.PROD_PACK={"1"},YEAR = {$(=Max(YEAR))}, MONTH, MONTHNUM = {"<= $(=MAX(MONTHNUM))"} ,SITUATION_PRODUIT>} REAL_PACKS.NOMBRE_PACK)

this exp shows 0,

and when i remove OBJ_PACK.TYPEPACK={REAL_PACKS.LIB_TYPE_PACK}

this exp shows result but it's not correct

1 Solution

Accepted Solutions
sunny_talwar

What if you do this

=Sum({<REAL_PACKS.PROD_PACK = {1}, YEAR = {$(=Max(YEAR))}, MONTH, MONTHNUM = {"<= $(=MAX(MONTHNUM))"} , SITUATION_PRODUIT>} If(OBJ_PACK.TYPEPACK = REAL_PACKS.LIB_TYPE_PACK, REAL_PACKS.NOMBRE_PACK))

View solution in original post

2 Replies
sunny_talwar

What if you do this

=Sum({<REAL_PACKS.PROD_PACK = {1}, YEAR = {$(=Max(YEAR))}, MONTH, MONTHNUM = {"<= $(=MAX(MONTHNUM))"} , SITUATION_PRODUIT>} If(OBJ_PACK.TYPEPACK = REAL_PACKS.LIB_TYPE_PACK, REAL_PACKS.NOMBRE_PACK))

souadouert
Specialist
Specialist
Author

hahah thank you sunny