Forum Discussion
Anonymous
7 years agoNot applicable
Expression.Error: We cannot apply indexing to the type Function
I'm loading a billing report into Power BI and if the deposit date has an asterix (*) on the end we need to replace the [CLT PAID NET] with a 0. (Don't ask me why, something to do with the billing software that produces the report, outside of my purview.)
[CLT PAID NET] is Int64.type
[CSH DEPTDT] is type text
#"Replace Deps" = Table.ReplaceValue(#"Removed Columns3", each [CLT PAID NET], each if Text.Contains([CSH DEPDT], "*") then 0 else [CLT PAID NET],Replacer.ReplaceValue{"CLT PAID NET"})The code above (which the Advanced Editor says has "No syntax errors") produces this error message:
Any help is much appreciated!!
HI, Anonymous
You just lack "," in your code: Replacer.ReplaceValue , {"CLT PAID NET"}
#"Replace Deps" = Table.ReplaceValue(#"Removed Columns3", each [CLT PAID NET], each if Text.Contains([CSH DEPTDT], "*")
then 0 else [CLT PAID NET],Replacer.ReplaceValue,{"CLT PAID NET"})Result:
Best Regards,
Lin
2 Replies
- v-lili6-msftCommunity Support
HI, Anonymous
You just lack "," in your code: Replacer.ReplaceValue , {"CLT PAID NET"}
#"Replace Deps" = Table.ReplaceValue(#"Removed Columns3", each [CLT PAID NET], each if Text.Contains([CSH DEPTDT], "*")
then 0 else [CLT PAID NET],Replacer.ReplaceValue,{"CLT PAID NET"})Result:
Best Regards,
Lin
- AnonymousNot applicable
(-‸ლ)
Thank you.