RattlingCarp3048
Board Regular
- Joined
- Jan 12, 2022
- Messages
- 202
- Office Version
- 365
- Platform
- Windows
New to using formulas in PQ Editor. I'm trying to write an IF statement but I'm not sure what I am missing. This is the formula i tried:
= Table.ReplaceValue(#"Changed Type",each [Date],each if [Date]=null and [Case #]=[Case #] then [Date] else "No Scan",Replacer.ReplaceText,{"Date"}))
Basically if Date = blank/null and Case # is the same as the one above it then replace blank/null with the date above else "No Scan". the date will always be at the top. So 5/21/2024 3:02 needs to be copied down the next 6 rows because its all the same.
Case # Date
= Table.ReplaceValue(#"Changed Type",each [Date],each if [Date]=null and [Case #]=[Case #] then [Date] else "No Scan",Replacer.ReplaceText,{"Date"}))
Basically if Date = blank/null and Case # is the same as the one above it then replace blank/null with the date above else "No Scan". the date will always be at the top. So 5/21/2024 3:02 needs to be copied down the next 6 rows because its all the same.
Case # Date
AB242437 | AB242437 A | 5/21/2024 3:02 | |||||
AB242437 | AB242437 A1 | | 5/21/2024 3:31 | 5/21/2024 4:52 | 5/21/2024 9:00 | 5/21/2024 10:18 | |
AB242437 | AB242437 B1 | | 5/21/2024 3:42 | 5/21/2024 4:52 | 5/21/2024 9:01 | 5/21/2024 10:21 | |
AB242437 | AB242437 B2 | | 5/21/2024 3:42 | 5/21/2024 4:52 | 5/21/2024 9:02 | 5/21/2024 10:23 | |
AB242437 | AB242437 B3 | | 5/21/2024 3:42 | 5/21/2024 4:52 | 5/21/2024 9:03 | 5/21/2024 10:26 | |
AB242437 | AB242437 B4 | | 5/21/2024 3:42 | 5/21/2024 4:52 | 5/21/2024 9:04 | 5/21/2024 10:28 | |
AB242437 | AB242437 B5 | | 5/21/2024 3:42 | 5/21/2024 4:52 | 5/21/2024 9:05 | 5/21/2024 10:30 | |
AB242446 | AB242446 A1 | 5/21/2024 10:25 | 5/21/2024 10:59 | 5/21/2024 15:32 | 5/21/2024 17:18 | ||
AB242446 | AB242446 B1 | 5/21/2024 10:27 | 5/21/2024 10:59 | 5/21/2024 15:28 | 5/21/2024 17:22 | ||
AB242446 | AB242446 B2 | 5/21/2024 10:27 | 5/21/2024 10:59 | 5/21/2024 15:29 | 5/21/2024 17:25 | ||
AB242446 | AB242446 B3 | 5/21/2024 10:27 | 5/21/2024 10:59 | 5/21/2024 15:31 | 5/21/2024 17:27 |