Forum Discussion
Create multi row card with latest date and text value
Hello,
I would like to create an "indicator" card that shows the latest date and text value (either "Criteria Met" or "Criteria Not Met") for the country selected in the slicer on the page. Many cells in the criteria column are blank so I would like to show the latest criteria and corresponding date for the selected country.
Any suggestions?
Thank you all! Yes, the filter was the issue. I was able to come to a solution with the following code:
most recent testing criteria = VAR Most_recent_date_testing = [Most recent date testing]
RETURN
CALCULATE(MAX([who_criteria_testing_last]), FILTER(ALL('who_criteria (2)'), 'who_criteria (2)'[Date] = Most_recent_date_testing))
6 Replies
- amitchandak
Super User
jg84 , Not very clear
max(Table[date]) or lastnonblank(Table[date], blank()) should give you that ?
- Greg_Deckler
Community Champion
jg84 Seems like you should just be able to put the value in the card and choose a default aggregation like first or max
- jg84Frequent Visitor
That's what I thought as well but it doesn't seem to update when I change the country on the slicer. It remains at "Criteria Not Met" When it should say "Criteria Met" for this selection.
- AnonymousNot applicable
jg84
You should also filter the target column or measure, try the following measure. See my example:Measure = CALCULATE(MAX([Date]), FILTER('Table',[who_crieria_testing]<>BLANK()))
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jg84Frequent Visitor
For example, I have 3 slicers on the page (country, data source, and testing data source). I would like to display the most recent text value for who_testing_criteria and the corresponding date in a card.
For this selection, it would show 9/6/2020 and "Critieria Not Met"