3 Replies Latest reply on Aug 3, 2018 12:37 PM by Ken Pattillo

# LOD for Previous Year (filtered from view)

Hi Jedis,

in 2018.1, I have a view that has years filtered by parameters, so you are only viewing the selected year.  I'd like a reference line that shows the previous year's total as a reference line.  I assuming the previous year's total needs to be a fixed LOD because it will not be in scope when the view is filtered for the selected year, correct?

In the attached workbook, on Sheet 3, I've plotted a running total of Monday Sales, and a reference line that I would like to be the previous year's total Monday Sales.  How do I get the calculated field "Monday Sales Previous Year LOD" to give me the previous year's total Monday Sales?

Thanks!  Ken

• ###### 1. Re: LOD for Previous Year (filtered from view)

Ken,

Can you try this:

{ fixed MONTH([Order Date]) : sum(if [Order Date Year]=[Select a Year]-1 and DATENAME("weekday",[Order Date]) = 'Monday' THEN [Sales] END) }

then use this calculation to put reference line.

1 of 1 people found this helpful
• ###### 2. Re: LOD for Previous Year (filtered from view)

Hi Ken,

Create the calculated field like below

Monday Sales Previous Year LOD:

{SUM(if YEAR([Order Date])=[Select a Year]-1

and DATENAME("weekday",[Order Date]) = 'Monday'

THEN [Sales] END)}

This will give previous year Monday sales

Hope this helps kindly mark this answer as correct/helpful to close the thread and it will be helpful who are having the same problem

BR,

NB

1 of 1 people found this helpful
• ###### 3. Re: LOD for Previous Year (filtered from view)

Both of these are the correct answer!