cancel
Showing results for 
Search instead for 
Did you mean: 

Query Designer - how to dynamically show previous month's results

Former Member
0 Kudos

Hi friends...new to the world of Query Designer and hoping to get some assistance from this wonderful community.  Scenario is this....looking to show in the same view a plan by month and then the change over the previous month.  Without hardcoding, how do I create this look?  Example would be as follows--

(Visible)               (Visible)          (Not Visible)          (Visible)

Cal Year/Mo          Plan          Prev Month Plan          Month Chg

Jan                         100             

Feb                         50                    100                    .5

Mar                         30                    50                      .6

Apr                         100                   30                     3.33

...

**Note: Regardless of what range of months the user enters, we would want to pull the previous month plan to complete the Month change calculation which is really just the month plan/prev month plan.

Thanks in advance for any and all insights!!

Accepted Solutions (0)

Answers (3)

Answers (3)

bhaskar_v3
Explorer
0 Kudos

Hi,

Create a user entry variable based on fiscal period. (So the user entries the period value in the selection screen you can define a range value for this )

Next create a hidden key fig (Plan for Prior Month) with selection as Variable based as

Fiscal period - 1 . (user entried period - 1)

Finally create a calculated Key Fig. as plan/prev month plan.

You will get the values as expected

Regards,

Bhaskar V

Former Member
0 Kudos

Thanks for your quick response.  In looking through the link you provided, I'm not clear on how to translate that for my particular look which to clarify needs to show the same key figure but on different timelines within the same month.  Please find below an updated example which shows how the values are intended to render based on the time period.  Is it still possible to get to this view with offset of variables based on the same time horizon and if so, additional detail on how would be GREATLY appreciated.  Thanks in advance for any and all insights!!

Key FigureJanFebMarApr
PlanJan ValueFeb ValueMar ValueApr Value
Plan for Prior MonthDec ValueJan ValueFeb ValueMar Value
shankarsgs
Contributor
0 Kudos

Hi Lil,

You can use offset to restrict the year to both previous from the current year filter selection variable. The example of it is given here.

http://help.sap-ag.de/saphelp_sm71_sp08/helpdata/en/3f/89533e5ff4d064e10000000a114084

/content.htm

Regards

Shankar

"Marking the correct answer helps other in finding it"