Forum Discussion
Lookup latest date, but dealing with multiple values
- 1 year ago
Last Valid Weight =
VAR lastdte =
CALCULATE (
MAX ( CustomerWeight[Measure Date] ),
NOT ( ISBLANK ( CustomerWeight[Weight] ) )
)
VAR result =
CALCULATE (
MAX ( CustomerWeight[Weight] ),
CustomerWeight[Measure Date] = lastdte
)
RETURN
IF ( result = 0, "No Height Listed", result )
vanessafvg That looks good. I'll do some data quality checks tomorrow and, if it's OK with you, get back to you if there are any further issues I find once I've incorporated this into my report. Many thanks indeed.
vanessafvg Is there a way of introducing text to each measure, to add to the table in the event of there being no data to return. For example 'No Height Data' where there is nothing. Many thanks again.
- vanessafvg1 year ago
Community Champion
you could but it would not longer be a numeric piece of data, it would need to be come a text column, it could be solved by using an if statement. are you wanting it to be text?
- Creative_tree881 year ago
Helper V
vanessafvg It could be text, yes. Would be interested to see the result.