Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jg84
Regular Visitor

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?

1 ACCEPTED SOLUTION

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))

 

 

View solution in original post

6 REPLIES 6
jg84
Regular 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. 

jg84_0-1599754345945.png

For this selection, it would show 9/6/2020 and "Critieria Not Met"

Greg_Deckler
Super User
Super User

@jg84 Seems like you should just be able to put the value in the card and choose a default aggregation like first or max 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Screenshot (3).png

@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()))
 
fillter company.JPG

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.
  

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))

 

 

amitchandak
Super User
Super User

@jg84 , Not very clear

max(Table[date]) or lastnonblank(Table[date], blank()) should give you that ?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.