This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
I have a dataset as follows:
| ID | Date | Success | Score |
| 123 | 11/19/2020 | 0 | 5 |
| 123 | 11/20/2020 | 1 | 6 |
| 123 | 11/21/2020 | 1 | 2 |
| 122 | 11/19/2020 | 0 | 8 |
| 122 | 11/20/2020 | 1 | 9 |
| 133 | 11/19/2020 | 1 | 1 |
| 133 | 11/20/2020 | 1 | 3 |
| 144 | 11/19/2020 | 0 | 4 |
You'll notice that ID is a column with repeats with each row tracking the date and success and score.
What I'm looking for is to be able to return the earliest known score for each unique ID where success is = 1. I would like to be able to populate the following (earliest_success_score).
| ID | Date | Success | Score | Earliest_success_score |
| 123 | 11/19/2020 | 0 | 5 | null |
| 123 | 11/20/2020 | 1 | 6 | 6 |
| 123 | 11/21/2020 | 1 | 2 | null |
| 122 | 11/19/2020 | 0 | 8 | null |
| 122 | 11/20/2020 | 1 | 9 | 9 |
| 133 | 11/19/2020 | 1 | 1 | 1 |
| 133 | 11/20/2020 | 1 | 3 | null |
| 144 | 11/19/2020 | 0 | 4 | null |
Thanks!
p.s. it's possible that there could be multiple submissions for a single day and the data has a time stamp in additiona to the date so the solution would look at earlist date and time (keeping the sample data simpler for ease of my understanding).
Solved! Go to Solution.
@Anonymous , Create a new column like
Column = var _1 = minx(FILTER(Data, [ID] =EARLIER([ID]) && Data[Success] = 1),Data[Date])
return
if(_1 =[date] ,minx(FILTER(Data, [ID] =EARLIER([ID]) && Data[Success] = 1 && [Date] =_1),[Score]),BLANK())
@Anonymous , Create a new column like
Column = var _1 = minx(FILTER(Data, [ID] =EARLIER([ID]) && Data[Success] = 1),Data[Date])
return
if(_1 =[date] ,minx(FILTER(Data, [ID] =EARLIER([ID]) && Data[Success] = 1 && [Date] =_1),[Score]),BLANK())
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 42 | |
| 42 | |
| 41 | |
| 21 | |
| 20 |