Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current vs Previous for Year, Quarter or Month

Hi Guys

I am looking for suggestions on the easiest or simplest way to perform this task below.

One of the functional requirements is for the dashboard to always compare the period of the current selection to the previous year period for the same selection.

Eg.

If Year 2015 is chose then display 2014

If Year 2015 and Quarter 2 is chosen then display 2014 and Quarter 2 sales

If Year 2015 and Quarter 3 and Month August then display 2014, Quarter 3, Month August sales

Bear in mind that the calculation is displayed in a text box.

I've did this before in a straight table with each column displaying in a previous Year, Quarter or Monthly column respectively but never in a text box accommodating all scenarios.

Any suggestions?

Regards,

Magen

1 Solution

Accepted Solutions
chrislofthouse
Partner Ambassador
Partner Ambassador

One method is to simply use Set analysis.

I'm going to make some assumptions you have Year, Quarter and Month filters/selections which drives the calculations. If this is correct you would only need to define the year in the set analysis, for example:

=Sum( {< Year={$(=Max([Year])-1)} >} [Sales])

If you have a copy of the application available I'll gladly take a look.

View solution in original post

1 Reply
chrislofthouse
Partner Ambassador
Partner Ambassador

One method is to simply use Set analysis.

I'm going to make some assumptions you have Year, Quarter and Month filters/selections which drives the calculations. If this is correct you would only need to define the year in the set analysis, for example:

=Sum( {< Year={$(=Max([Year])-1)} >} [Sales])

If you have a copy of the application available I'll gladly take a look.