You need to sign in to do that
Don't have an account?
naresh john
Very very complex soql query please help me
HI Every one,
I have a custom object "Transactions".The fields are Id, Name, Amount, TransactionDate. How to calculate % change(Increase or decrease ) in amounts month to month this year. In this format I need to display.
Month Amount received % change(When compared to last month)
Kindly help me its my urgent requirement.If any one worked on same requirement, please provide the code here, It will be a great help.
Thanks in advance,
Naresh
Yes, I figured it would be possible to group by month. I just didn't have the time to do an actual test ;)
True, there are several ways of getting your resutl shown. Personally, I'd go for the VisualForce suggestion but that depends on what it is needed for.
/Søren Nødskov Hansen
All Answers
I feel this kind of SOQL cannot be constructed.
Thanks for the reply.
If its not possible, then how to solve this requirement.Any other ways to do it.Can you please give me any idea of approach, so that I may work on it and get the result.
Thanks,
Naresh
Hi,
Maybe I'm misunderstanding but wouldn't you simply do something like this:
NB: The above is pseudo code and not something I've actually tested so it may (will) include typos and/or syntax errors.
Another way (again untested - just brain storming here) could be to query backend for all Transaction__c objects and group them by MONTH(Transaction__c). I'm not sure if this is actually possible.
Hope it helps.
/Søren Nødskov Hansen
You can group by month...
Once you've got that you can calculate your Month over Month in whatever format is preferred
You could write:
Yes, I figured it would be possible to group by month. I just didn't have the time to do an actual test ;)
True, there are several ways of getting your resutl shown. Personally, I'd go for the VisualForce suggestion but that depends on what it is needed for.
/Søren Nødskov Hansen
Thank you so much for the above help. Let me check that.