Forum Discussion
Reference a measure in another measure
- Anonymous10 years ago
I just realized I made a mistake in my code. That code for Last Entry will return the date of the last entry, not the last entry itself. Looking back at your original formula I think it should be
Last Entry = CALCULATE( LASTNONBLANK( 'Trends'[Total Unresolved], 1), DATESMTD(DateTable[Date]) )
...or whatever the column is with the number you're trying to tally. Not the timestamp column.
Now, if you really really want to have that last date with an entry, add a third measure:
Last Date = CALCULATE( MAX('Santiago Trends'[action_timestamp]), DATESMTD(DateTable[Date]) )You could use my original mistake version of Last Entry, but this version also works, and is slightly easier to type.
I just realized I made a mistake in my code. That code for Last Entry will return the date of the last entry, not the last entry itself. Looking back at your original formula I think it should be
Last Entry = CALCULATE( LASTNONBLANK( 'Trends'[Total Unresolved], 1), DATESMTD(DateTable[Date]) )
...or whatever the column is with the number you're trying to tally. Not the timestamp column.
Now, if you really really want to have that last date with an entry, add a third measure:
Last Date = CALCULATE(
MAX('Santiago Trends'[action_timestamp]),
DATESMTD(DateTable[Date])
)You could use my original mistake version of Last Entry, but this version also works, and is slightly easier to type.
Finally got it working! Thanks again for your help KHorseman!