mahmed1
Well-known Member
- Joined
- Mar 28, 2009
- Messages
- 2,302
- Office Version
- 365
- 2016
- Platform
- Windows
Hey Guys, how can i replicate this in powerbi Dax like excel below
Say i had a table like this
What i wanted to do is based on whatever date i select - i want to pull back the value from what it was 7 days ago - eg say i selected 20/12/2022
the data table results should look like this
Say i had a table like this
Date | Score |
29/11/2022 | 50 |
30/11/2022 | 20 |
01/12/2022 | 7 |
02/12/2022 | 22 |
03/12/2022 | 15 |
04/12/2022 | 26 |
05/12/2022 | 27 |
06/12/2022 | 27 |
07/12/2022 | 13 |
08/12/2022 | 31 |
09/12/2022 | 32 |
10/12/2022 | 22 |
11/12/2022 | 19 |
12/12/2022 | 45 |
13/12/2022 | 24 |
14/12/2022 | 30 |
15/12/2022 | 42 |
16/12/2022 | 34 |
17/12/2022 | 33 |
18/12/2022 | 33 |
19/12/2022 | 21 |
20/12/2022 | 37 |
21/12/2022 | 10 |
22/12/2022 | 34 |
What i wanted to do is based on whatever date i select - i want to pull back the value from what it was 7 days ago - eg say i selected 20/12/2022
the data table results should look like this
SELECTED DATE | 20/12/2022 |
20/12/2022 | 37 |
13/12/2022 | 24 |
06/12/2022 | 27 |
29/11/2022 | 50 |