5 Replies Latest reply: Feb 16, 2012 11:12 AM by Michaël REMILLIER

# Display current and previous total regarding selection made for ‘Date’ dimension

Dears,

I need help for a very BASIC need !

I have one dimension 'Date' which corresponds to LOAD Date for several sources files.

I just want to display the current TOTAL regarding selection made for ‘Date’ dimension and the total for the previous day available in the list BUT NOT REGARDING THE PREVIOUS SELECTION MADE (i.e set analysis functions), which is different.

As you can see (enclosed and here below), I have for instance 01/23/2012 as Day and previous day is 01/20/2012.......How can I automatically gather previous day available........

Thanks a lot, Michaël.

• ###### Display current and previous total regarding selection made for ‘Date’ dimension

Michaël,

Try the following expression:

if([Total Delta MT]=0.00,'-', Sum({\$<BibleDate={'\$(=max({1<BibleDate={"<\$(=max(BibleDate))"}>} BibleDate))'}>} [Total Delta MT]))

The tricky part of the expression is finding the previous day since the previous day is not always 1 day less than the day selected so that's why you have to do the nexted set analysis to find the previous day.

Karl

• ###### Display current and previous total regarding selection made for ‘Date’ dimension

Dear Karl,

Thanks a lot for this effective response.

If I want to store in a variable vPreviousDay this ‘Previous’ value,

How can I deal with syntax?

Directly this: {\$<BibleDate={'\$(=max({1<BibleDate={"<\$(=max(BibleDate))"}>} BibleDate))'}>}  ?

Michaël.

• ###### Display current and previous total regarding selection made for ‘Date’ dimension

In the vPreviousDay variable put {\$<BibleDate={'\$(=max({1<BibleDate={"<\$(=max(BibleDate))"}>} BibleDate))'}>} without an equal sign and then your expression will be:

if([Total Delta MT]=0.00,'-', Sum(\$(vPreviousDay) [Total Delta MT]))

Karl

• ###### Display current and previous total regarding selection made for ‘Date’ dimension

Dear Karl,

You gave me a good input to display the previous TOTAL for the previsus 'Date' available as following:

In the vPreviousDay variable put

{\$<BibleDate={'\$(=max({1<BibleDate={"<\$(=max(BibleDate))"}>} BibleDate))'}>} without an equal sign and then your expression will be:

if([Total Delta MT]=0.00,'-', Sum(\$(vPreviousDay) [Total Delta MT]))

But........how can I deal with [Date - 2], [Date - 3], [Date - 4] values as per schema here below????

Michaël

.

• ###### Display current and previous total regarding selection made for ‘Date’ dimension

Thanks Karl as usual!