Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following data as shown in the table below.
CNS=ANS - WANS
CR= AR-WAB
While calculating the total, I need only those months selected where ANS <>0 and WANS <>0. I am trying to setup the set analysis for this a need some help. If anyone can suggest the appropriate set analysis statement, I would appreciate it.
I am getting the value of 6.22 while I should get 4.98 when calculating the Totals
|
---|
Hi,
What is your current expression for calculating total???
Regards
The corrected total should select those months where ANS <>0 and WANS <>0
e.g, 309= 100+209 for months Feb and Mar ignoring the other months.
Thanks
The correct expression for calculating the total of 4.98 is 269/54 i.e CNS/CR
Thanks
ANS 309
if(Dimensionality()=0,
sum(aggr(if(sum(ANS)>0 and sum(WANS)>0, sum(ANS)),Month)),
sum(ANS)
)
WANS 40
if(Dimensionality()=0,
sum(aggr(if(sum(ANS)>0 and sum(WANS)>0, sum(WANS)),Month)),
sum(WANS)
)
Thanks for the replies. I was able to get to what I needed using a combination of both your ideas. Thanks again.
Hi Naresh,
Please close the discussion by selecting Correct answer and Helpful.