Forum Discussion
newkingdom
7 years agoFrequent Visitor
Next available day
Hi I have a patienid and dates. I want to choose the next earliest date.
| patientid | date | patietid | nextdate | ||||||
| 1 | 8/20/2019 | 1 | 9/21/2019 | ||||||
| 1 | 9/21/2019 | 2 | 9/26/2019 | ||||||
| 1 | 10/22/2019 | 3 | 9/28/2019 | ||||||
| 2 | 8/23/2019 | 4 | 8/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
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 () )
1 Reply
- AlBCommunity Champion
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 () )