Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a set of data where a certain value appears multiple times. I want to know the date that the previous value appeared to the current date. Example below of data.
Name | Date |
Blue | 1/1/2022 |
Red | 8/4/2021 |
Blue | 5/1/2021 |
Blue | 4/2/2021 |
Green | 4/1/2021 |
Green | 2/3/2021 |
Example of what I need for results:
Name | Date | Previous Date |
Blue | 1/1/2022 | 5/1/2021 |
Red | 8/4/2021 | null |
Blue | 5/1/2021 | 4/2/2021 |
Blue | 4/2/2021 | null |
Green | 4/1/2021 | 2/3/2021 |
Green | 2/3/2021 | null |
Any help would be greatly appreciated. Thank you in advance!
Solved! Go to Solution.
A new column
maxx(filter(Table, [Name] =earlier([Name]) && [Date] <earlier([Date]) ) , [Date])
A new column
maxx(filter(Table, [Name] =earlier([Name]) && [Date] <earlier([Date]) ) , [Date])
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |