Forum Discussion
Trying to replace errors and replace values dynamically instead of entering static value
- 5 years ago
klehar Another thought on this. ReplaceErrorValues but use a date like 12/30/2100. Add a conditional column and if that is the value, replace with your AddDays logic, otherwise, just use the existing date. Remove the original column and you are good.
klehar I'm thinking:
#"Replaced Errors" = Table.ReplaceErrorValues(#"Changed Type", {"Lease start", Date.AddDays([Funded date],-16)}),
#"Replaced Value" = Table.ReplaceValue(#"Replaced Errors",null,Date.AddDays([Funded date],-16),Replacer.ReplaceValue,{"Lease start"})
in
#"Replaced Value"
First line changed dropping the extra { } items. If this doesn't work, I will try to mock something up.
Greg_Deckler , this doesnt work, can you mock somethign up
- Greg_Deckler5 years ago
Community Champion
klehar Another thought on this. ReplaceErrorValues but use a date like 12/30/2100. Add a conditional column and if that is the value, replace with your AddDays logic, otherwise, just use the existing date. Remove the original column and you are good.
- klehar5 years ago
Helper V
Greg_Deckler , Thats how it is already implemented currently. But my transformations already have a lot of steps slowing down the report. I;m trying to reduce every step I can
- Greg_Deckler5 years ago
Community Champion
klehar I totally understand. Real question on the performance front though is if the backend is something like SQL Server. If so, right-click your steps and see if you have Query Folding available. Move your steps around as possible so that as much of the query folds back into the backend as possible. That will have less processing taking place on your gateway and should boost performance in terms of refresh.
- Greg_Deckler5 years ago
Community Champion
klehar Hmm, well if you do this you get back Function so progress?
#"Replaced Errors" = Table.ReplaceErrorValues(#"Changed Type", {{"Lease start", each Date.AddDays([Funded date],-16)}})