Hi
Is it possible to dynamically select the view based on Cases statement.
Myscenario
I have to show the actual sales and projected sales.
Every month, the showroom sends the actuals sales and the projected sales.
Ex.
Showroom | Jan 2016 | Feb 2016 | Mar 2016 | Apr 2016 | May 2016 | June 2016 | July 2016 | Aug 2016 | Sep 2016 | Oct 2016 | Nov 2016 | Dec 2016 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
SHW - 1 | 200 | 300 | 400 | 500 | 500 | 400 | 300 | 350 | 500 | 400 | 300 | 200 |
In Month of Feb , Jan and Feb will be actual sales and march to december will be projected sales
Some months, the same showroom may not send projected sales, but actual sales only
Ex In month of april, the showroom has send only Actual sales till Apr 2016
Showroom | Jan 2016 | Feb 2016 | Mar 2016 | Apr 2016 | May 2016 | June 2016 | July 2016 | Aug 2016 | Sep 2016 | Oct 2016 | Nov 2016 | Dec 2016 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
SHW - 1 | 200 | 300 | 400 | 500 | ||||||||
So when we run the report, I should take the previous month Projected sales and need to apply for remaining months
In this case, I need to take March data which has projected sales from Mar to Dec and I need apply from May to Dec
So,
The possible thought is , will create projection for last month, and current month and if the projected months value is empty I need to take from other projection (ie last month)
Sometimes, it may be case, the projected sales they might have given only one time , so I need to traverse back to find the month where the projected sales exist and to take projected sales from those and apply in report
Coming back to question, is it dynamically I can select the projection I need to report based on condition
Ex.
if curr month projected sales exist
take proj 1
else if month-1 projected sales exist
take proj 2
else if month-2 projected sales exist
take proj 3
-
-
-
else if month-11 projected sales exist
take proj 12
Regards
Ben