Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello all,
i have a nested if statement that works properly. i need to sum the result so that i can get the sum to show when i swich to pivot table view.
if
((AddMonths((date(today())),-v_mlai)>date(max({$<m=,q=,y=,day=>}[sale date])))
,sum({$<m=,q=,y=,day=>}[[items in inventory])
,if(IsNull([sale date])
,if((AddMonths((date(today())),-v_mlai)>date(Max({$<m=,q=,y=,day=>}[inventory date])))
,sum({$<m=,q=,y=,day=>}[items in inventory])
,0)
,0)
)
i have tried puting the entire statement in a sum() function but that dosnt work (i get ' -' value in all the cells). i also tried reconstracting the statement in severl different ways removing the set analysis and removing the sum() statements that are in the if() statments but i cant get it to wrok.
can someone pls tell me why dosnt puting the entire statement in a sum() function work?
also if you have any sugastions on how to reconstract the statment so that i get to sum to show on a pivot table, they will be greatly appreciated.
thanks in advance,
jonathan
You cannot directly use one aggregate function inside another aggregate function
You can try like Sum(Aggr(Your_expr,Dim1,Dim2..))
You cannot directly use one aggregate function inside another aggregate function
You can try like Sum(Aggr(Your_expr,Dim1,Dim2..))
provide sample data please
thanks for the help. i removed both the sum() and max() functions and put the entire statement in a sum() function (moving the set analysis to the outer sum function only) and it works.
thanks again