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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
RPAI2812
Helper I
Helper I

Card based on another column

I have a column of names and a column of next exam date.

I wanted to display a card with the name of the person with the closest date to the next exam related to today().

 

How can I do this? I guess this should be simple, but I'm doing something so complex that I wanted to hear suggestions 🙂

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @RPAI2812 ,

 

One can try the following formula.

Min_date = DATEDIFF(TODAY(),'Table'[Next exam date],DAY)
Next_name =
VAR rank_ =
    RANKX ( 'Table', 'Table'[Min_date],, ASC )
RETURN
    IF ( rank_ = 1, 'Table'[Name], BLANK () )

vhenrykmstf_0-1652256883117.png


If the problem is still not resolved, please point it out. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @RPAI2812 ,

 

One can try the following formula.

Min_date = DATEDIFF(TODAY(),'Table'[Next exam date],DAY)
Next_name =
VAR rank_ =
    RANKX ( 'Table', 'Table'[Min_date],, ASC )
RETURN
    IF ( rank_ = 1, 'Table'[Name], BLANK () )

vhenrykmstf_0-1652256883117.png


If the problem is still not resolved, please point it out. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ddpl
Solution Sage
Solution Sage

Hi,

Try this Measure

 

Measure 3 = LOOKUPVALUE(Card[Name],Card[Date],MIN(Card[Date]))
 
VipulGadhiya_0-1651662805665.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors