Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a scenario,
where if a date is selected from multibox, my set analysis should include that date and all datest less than that.
Date x
1/1/2011 5
1/2/2011 8
1/3/2011 10
1/4/2011 12
1/5/2011 14
So when the user selects 1/4/2011 then I need to set the sum of a columns X. for dates 1/4/2011 and all dates less than 1/4/2011
if the user selects more than one selection from the multibox, then sum of X only for the selected dates should be computed.
If user selectes only one date 1/4/2011 then value computed should be Y = (5+8+10+12) = 35
If the user selects more than one date like, 1/1/2011 and /1/5/2011 then Y = (5+14) = 19
How can I achieve this? Please advice
OK, I was missing the equal sign. Try this:
sum( {$<Date={"<=$(=max(Date))"}>} X )
Well, for the first you can use:
sum( {$<Date={"<=$(max(Date))"}>} X )
I don't know if it'll work for the second requirement.
Hello Carlos,
Thanks for responding.
I tried the solution provided by you for 1, It does not seem to calculate it right, It simply behaves like ignoring Date
like Date=>
It can be due to several causes, can you post a qvw to help you?
OK, I was missing the equal sign. Try this:
sum( {$<Date={"<=$(=max(Date))"}>} X )
Hi Carlos,
Thanks a lot, that did the magic.
This will do both requirements:
=if ( count(distinct Date)=1, sum( {$<Date={"<=$(=max(Date))"}>} X ), sum(x))
Hi Carol,
Thank You for your reponse, and for the solution for the complete problem.
I was working on an important assignment and was stuck here, Thanks
am able to proceed.