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

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.

SimpleIssue.jpg

1 Solution

Accepted Solutions
pover
Luminary Alumni
Luminary Alumni

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

View solution in original post

5 Replies
pover
Luminary Alumni
Luminary Alumni

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

Not applicable
Author

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.

pover
Luminary Alumni
Luminary Alumni

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

Not applicable
Author

Thanks Karl as usual!

Not applicable
Author

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????

Previous Dates Available TOTAL Display.jpg

Thanks in advance,

Michaël

.