Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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