4 Replies Latest reply on Mar 31, 2016 3:39 AM by Tony Ball

# Calculation for total using date parameter

Hi All,

I hope you are well. I've got myself really stuck with a calculation on a workbook and wondered if you can help.

Basically I want to produce a display that has running totals of 2 values over time - one is based on cost and the other on energy usage in 4 locations.

I've managed to get the cost part of the panels change in value depending on the date range picked, however I'm really stuck on being able to do this for the energy part of the board.

I've attached a workbook where I've tried lots of different things. I've used an LOD calc on the energy part that was kindly given to me on this forum. However this fixes the value between min and max dates on the workbook. If possible I would like the energy readings to change based on date range the same way that the cost part does.

I then looked at using date parameters instead but have been unable to get anything with parameters to work.

Really hoping someone can help out with this one.

Screenshot and workbook attached.

• ###### 2. Re: Calculation for total using date parameter

Hi Andrew,

Thanks for the info. I didn't realise it would be so simple!

• ###### 3. Re: Calculation for total using date parameter

Hi Tony,

Might as well tell you why it works as well. The FIXED LOD is a calculated expression that works much the same way a subquery would work. It goes out before regular filters and gets the values you requested. So by having a normal date filter this FIXED expression was ignoring them. A Context Filter comes before a FIXED LOD expression. So the LOD Runs AFTER the date range filter is applied so it is restricted based on the dates you've selected.

Cheers

Carl Slifer

InterWorks

1 of 1 people found this helpful
• ###### 4. Re: Calculation for total using date parameter

Hi Carl,

Thanks for the explanation. It makes a lot more sense now. Basically put the Date Range Horse before the values cart :-)

I can see context being useful for other stuff I'm working on now I know how it behaves properly.