Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I write this in set analysis.
=Sum(if(ActualAccount<>0,
if([Miscellenious Fee]<>0,
year=, Month=, Date='>=$(=MonthStart(Max(Date), -1))<=$(=MonthEnd(Max(Date), -1))'),FeeAmount)))
I am calculating the previous month feeamount if ActualAccount <> 0 and if Miscellenious Fee <>0.
Thanks.
SUM({$<
ActualAccount -= {0},
[Miscellenious Fee] -= {0},
Year =, Month=,
Date = {">=$(=MonthStart(Max(Date)),-1) <= $(=MonthEnd(Max(Date)),-1)"}
>}FeeAmount)
hi
SUM({$< ActualAccount -= {0}, [Miscellenious Fee] -= {0}, Year =, Month=, Date = {">=$(=MonthStart(Max(Date)),-1) <= $(=MonthEnd(Max(Date)),-1)"}>}FeeAmount)
Hi Aptha0115, keep in mind that the if statements will include your null values. However, the set analysis will always exclude them because they cannot be selected. To correct the behaviour you should insert statements in your load script like:
if(isnull(ActualAccount),0,ActualAccount) AS ActualAccount,
if(isnull([Miscellenious Fee]),0,[Miscellenious Fee]) AS [Miscellenious Fee]