Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

changing the expression

Hello All,

      is it possible to write below expression in different way without using Total function

Sum({<[YEAR]={$(=max([YEAR])-1)}>}total<Part,[PLANT NAME],FISCYEAR>Value)



i tried this but i am getting null values

aggr(nodistinct  Sum({<[YEAR]={$(=max([YEAR])-1)}>}Value),Part,[PLANT NAME],FISCYEAR)




can suggestion .....


thanks

6 Replies
avinashelite

Why nodistinct  in the second expression ??

sunny_talwar

May be this

Only({<[YEAR]={$(=max([YEAR])-1)}>} Aggr(NODISTINCT Sum({<[YEAR]={$(=max([YEAR])-1)}>}Value), Part, [PLANT NAME], FISCYEAR))

kunkumnaveen
Specialist
Specialist
Author

i tried without using nodistinct but still i am getting all values as null

aggr(Sum({<[YEAR]={$(=max([YEAR])-1)}>}Value),Part,[PLANT NAME],FISCYEAR)

kunkumnaveen
Specialist
Specialist
Author

Thanks for your reply,my server gone down i am enable to check ur expression in the mean could u please suggest me the below expression is it a vaild expression

in a straight table

colume(1) is sum of quantity

colume (2) is sum of value

colume(3) is colume(1)*colume(2)

now in  columne(4) can i write expression in this way

aggr(colume(3),part,[PLANT NAME],FISCYEAR)

Is this a valid one.....

sunny_talwar

You cannot use Column() function with Aggr(), use the underlying expressions instead of column reference

Kushal_Chawda

=sum({<[YEAR]={$(=max([YEAR])-1)}>}aggr(Sum({<[YEAR]={$(=max([YEAR])-1)}>}Value),Part,[PLANT NAME],FISCYEAR))