Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have a table with Revenue numbers with dates and months. I want to compare the selected Revenue numbers with the previous Revenue numbers. (SELECTED_REV / PREVIOUS_REV)
For eg. if i have selected Mar then I would like to Compare Revenue in March compared to Revenue in Feburary (MAR_REV / FEB_REV). If the user sellects March and April then it should be compared with Jan and Feb.
I dont want to hard code it for any fixed duration. Any ideas?
Hi,
Try below function to get the previous month data.
Consider you have Month,Year and Date as field name.
Sum{<Month = {"$(=month(addmonths(Max(Date),-1)))"},Year=,Date=>}Sales)
Regards,
Kaushik Solanki
Thanks Kaushik,
This works for a single selection but when I choose multiple months then it doesnt give the correct answer. The QVW file is attached.
Regards
HI,
Its right. This expression will be for one month selection only.
what you exactly want to do, will you please describe with example.
Regards,
Kaushik Solanki
I want to find the percentage increase in Sales. So if the user selects Feb then it should display the percantage growth of sales over Jan (this can be done with the expression you provided).
However the user will also be selecting multiple months. Lets say Apr, May and June. In this case i want to see Sales of Jan, Feb and Mar so i can find out the percentage growth of sales.
You can try using the above function. This has one disadvantage: the first selected month can't be compared with the previous one. If you need that you'll have to create an 'AsOf' table. See attached qvw for both options.
Thanks. You guys have somewhat answered the question but it still doesnt work with multiple selections. But ill try to make this work