Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have a problem with a conditional sum.
I have the following situation. I have a straight table with one dimension called region. and then I have the following 3 expressions:
1) if
(year=2010 , sum(A)+sum(b))
2) if(year=2009 , sum(A)+sum(b))
3) column(1)/column(2)
my problem is the current one. If the user doenst select anything both 1 and 2 are not calculated. then if user selects year 2010 only 1 is getting caclulated and user selects 2009 as a year only the 2 is getting populated. what I want is that both of them are getting calculated on the same time so 3 can work.
any ideas? thank you in advance!
Hi,
Try use set analysis:
For expression 1:
Sum({$<Year = {2010}>} A + B)
For Expression 2:
Sum({$<Year = {2009}>} A + B)
Regards
Hi,
Try use set analysis:
For expression 1:
Sum({$<Year = {2010}>} A + B)
For Expression 2:
Sum({$<Year = {2009}>} A + B)
Regards
Hi,
Tr using set Analysis.
1.Sum({<Year={2010}>} A)+Sum({<Year={2010}>} B) or Sum({<Year={2010}>} A+B) (Depending on your Table structure)
2.Sum({<Year={2009}>} A)+Sum({<Year={2009}>} B) or Sum({<Year={2010}>} A+B)
Regards,
Syed Muzammil.
thanks guys! it works!