Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 |
---|---|
18 | |
18 | |
14 | |
13 | |
13 |
User | Count |
---|---|
17 | |
14 | |
14 | |
10 | |
8 |