Forum Discussion
Decal
Helper I
2 years agoURGENT: Single Cell Date Replace
I'm doing HR reporting where Hire Date is an important field. A person was rehired under the same employee ID causing retention reporting to be thrown off. The employee id is 07385. The cu...
- 2 years ago
#"HireDtKaylee" = Table.ReplaceValue( #"Replaced Value2", each [EEID] = "07385", #date(2020,9,8), (x,y,z)=> if y = true then z else x, {"Hire Date"})
ronrsnfld
Super User
2 years ago#"HireDtKaylee" = Table.ReplaceValue(
#"Replaced Value2",
each [EEID] = "07385",
#date(2020,9,8),
(x,y,z)=> if y = true then z else x,
{"Hire Date"})- Decal2 years ago
Helper I
I'm unclear how to use the x,y,z. Can you clarify how to use the eeid and dates in here?
- Decal2 years ago
Helper I
Scratch that, I did it verbatim and it works. I guess somehow it knows what x, y, and z are
- ronrsnfld2 years ago
Super User
Yes, the fourth example on the Microsoft Help page for the Table.ReplaceValue function shows an instance of its use.
Or, to make x,y,z a little more understandable:
#"HireDtKaylee" = Table.ReplaceValue( #"Replaced Value2", each [EEID] = "07385", #date(2020,9,8), (arg2, arg3, arg5)=> if arg2 = true then arg3 else arg5, {"Hire Date"})