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
newkingdom
Frequent Visitor

Next available day

Hi I have a patienid and dates. I want to choose the next earliest date. 

 

          
 patientid date  patietidnextdate  
 1 8/20/2019  19/21/2019  
 1 9/21/2019  29/26/2019  
 1 10/22/2019  39/28/2019  
 2 8/23/2019  48/30/2019  
 2 8/24/2019      
 2 10/25/2019      
 2 9/26/2019      
 3 8/27/2019      
 3 9/28/2019      
 3 9/29/2019      
 4 8/30/2019      
          
          

 

 

so in essence, find the earliest date which is greater than today

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @newkingdom 

1. Place Table1[patientid] in the rows of a table visual

2. Create this measure and place it in the visual

NextDate =
CALCULATE ( MIN ( Table1[Date] ), Table1[Date] > TODAY () )

View solution in original post

1 REPLY 1
AlB
Super User
Super User

Hi @newkingdom 

1. Place Table1[patientid] in the rows of a table visual

2. Create this measure and place it in the visual

NextDate =
CALCULATE ( MIN ( Table1[Date] ), Table1[Date] > TODAY () )

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.