Forum Discussion
Return a value based on the latest date
Joachimnicho wrote:
Hi,
I have an issue.
I am trying to return a value, which is text, based on a date corresponding to the same row, but in a different column.
The problem is, that I have som duplicate values in the column, where I wish to return the value.
So I am trying to build a formula, which returns a text value based on the latest date.
I have tried multiple variations of LOOKUPVALUE combined with LASTDATE and MAX, but it keeps saying that "A table of multiple values was supplied where a single value was expected"
Any help is appreciated, since I am new to Power Bi. :-)
You can see a simple demo as below.
return value = ( CALCULATE ( MAX ( Sheet[date] ), ALLEXCEPT ( Sheet, Sheet[value] ) ) ) return = MAXX ( FILTER ( Sheet, Sheet[date] = Sheet[lasted date] ), Sheet[value] )
Thank you for your time!
But I need to hold the [projektnummer] in the table where I want to extract the value [Leverancetype] equal to [Job_no] in the table I am going to post the value. How do I apply that to formula?