3 Replies Latest reply on Sep 11, 2017 11:49 AM by Vinh Ton

# LOD calculation for aggregating over a date range?

Suppose there is a daysRange parameter that is set to 2.

Is there a LOD expression approach to

sums the value 2 days back including current day.

I do need LOD specific solution as the example below is for simple demonstration only.

My actual implementation will not be using tables.

Thanks ahead

 Date Value SumOverRange 1-Jan 1 1 2-Jan 2 2+1=3 3-Jan 3 3+2=5 4-Jan 4 7 5-Jan 5 9 6-Jan 6 11 7-Jan 7 15
• ###### 1. Re: LOD calculation for aggregating over a date range?

Hi Vinh,

You can use Table calc instead of LOD in this case.

-1 means one row above and 0 means current row.

As a result, each cell shows above row + current row.

Thanks,

Shin

<< Ambassador Spotlight Here ! >>

• ###### 2. Re: LOD calculation for aggregating over a date range?

Hi, Vinh

Here is another solution by using parameter control the date range

Hope this could help

ZZ

• ###### 3. Re: LOD calculation for aggregating over a date range?

Thanks, I ended doing a sql solution but it won't be able to handle situations that require on the fly answer. Still on the lookout for LOD solution if it exist