Getting the last date

Advertisement
Hello,
I need to be able to show the last date's value for all dates where a fact measure exists.
For example, let's say I have the following fact table:
Date                  Value
01/01/2000       1
01/02/2000       3
01/03/2000       2
01/05/2000       7
What I need is to have a calculated measure that shows the last entry, so that when I have the pivot table, it looks like this:
Date                  Value  Calculated Measure
01/01/2000       1         7
01/02/2000       3         7
01/03/2000       2         7
01/05/2000       7         7
Advertisement

Replay

Hi Kostaz,
You could try defining a calculated column...I've called this 'Calculated Column' in my example:
=
CALCULATE(
MAX(Data[Value]),
FILTER(
Data,
Data[Date] = MAX(Data[Date])
Then you can use a measure to return the MAX value:
Calculated Measure:=MAX([Calculated Column])
Regards,
Michael
Please remember to mark a post that answers your question as an answer...If a post doesn't answer your question but you've found it helpful, please remember to vote it as helpful :)