Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

Why Expression after i add Aggr function , it return wrong value ?

Hi All I have below expression , return correct values :- '= money( SUM({}Amount*-1)/1000/$(Columndim89) , $(vMoneyFormatK)) Due to it does not display Total Sum , So I have modify the above expression with Aggr , but it return wrong value , May I know how to make it return correct value ? = money( Sum(Aggr(SUM({}Amount*1)/$(Columndim89)/1000, SOURCE)) , $(vMoneyFormatK)) Paul

3 Replies
paulyeo11
Valued Contributor II

Re: Why Expression after i add Aggr function , it return wrong value ?

Hi All

I have below expression , return  correct value  :-

money(

SUM({<year = {"$(=Max(year)-1)"},month={"<$(=Max({<sales = {'*'}, year = {$(=Max(year))}>}month))"},eXP={eXP}>}Amount*-1)/1000/$(Columndim89)

, $(vMoneyFormatK))

Due to it does not display Total Sum , So I have modify the above expression with Aggr , but it return wrong value , May I know how to make it return correct value ? .

=

money(

Sum(Aggr(SUM({<year = {"$(=Max(year)-1)"},month={"<=$(=Max({<sales = {'*'}, year = {$(=Max(year))}>}month))"},eXP={eXP}>}Amount*1)/$(Columndim89)/1000, SOURCE))

, $(vMoneyFormatK))

Paul

paulyeo11
Valued Contributor II

Re: Why Expression after i add Aggr function , it return wrong value ?

my QV Doc

paulyeo11
Valued Contributor II

Re: Why Expression after i add Aggr function , it return wrong value ?

my QVF file

Community Browser