Forum Discussion
dreyes6
4 years agoHelper I
Find Latest Date
I'm trying to make an output that is looking for the latest date below is my data, there are names that have multiple image and I need the image with te latest date ID Name IMAGE Pric...
- Anonymous4 years ago
Hi dreyes6 ,
Please try this:
IMAGE OUTPUT = VAR _latest_date = CALCULATE ( MAX ( 'Table'[Effective Date] ), FILTER ( 'Table', 'Table'[ID] = EARLIER ( 'Table'[ID] ) ) ) VAR _output = CALCULATE ( MAX ( 'Table'[IMG] ), FILTER ( 'Table', 'Table'[Effective Date] = _latest_date && 'Table'[ID] = EARLIER ( 'Table'[ID] ) ) ) RETURN _outputBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
dreyes6
4 years agoHelper I
Appreciate anyone's help. Thanks a lot community
- Anonymous4 years agoNot applicable
Here is how you can add the IsLastest column:
Create a Calculated Column
IsLatest = VAR vImage = YourTable[IMAGE] VAR vLastDate = CALCULATE(MAX('YourTable'[Column3]), ALL(YourTable), YourTable[IMAGE] = vImage) RETURN IF('YourTable'[Column3] = vLastDate, "Y", "N")Then you can use a table visual to display all the data. Make sure you set all the fields to "Don't Summarize". This gives:
You can then simply filter the IsLatest column to Y, which makes the table display this:
Is this what you are looking for?