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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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
Master
Master
Author

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
Master
Master
Author

my QV Doc

paulyeo11
Master
Master
Author

my QVF file