error-handling - Replace null value in Table before TransformColumns
问题描述
In a PowerBI datasource I have a table with a Column "SPRINT" in one Column. This column contains a LIST of values or null (value comes from JIRA API).
In the next step I extract the values using Table.TransformColumns
to geht the string out:
= Table.TransformColumns(#"PREVIOUS", {"Sprint", each Text.Combine(List.Transform(_, Text.From), ";"), type text})
Result:
in the next steps I do a SplitColumn
in order to get the information out of this SPRINT string that I want to have.
In the end, all rows where SPRINT was null end in several columns with ERROR.
So my question is, how can I manage to prevent getting all those errors? Ideally I would expect to transform the SPRINT Column values where SPRINT is null into something that does not end with ERROR and avoid the execution of SPLIT function in case it does not make any sense.
I managed to add Table.ReplaceErrorValues
in the end for all affected columns - and this works but it seems to be quite an overhead to me and I try to keep the transformations as slim as possible because the JIRA API is slow and tending to timeout with a specific number of rows and operations.
Thanks for helping out!
解决方案
如果它为 null,您可以在展开后简单地再添加一个步骤,并将 error 替换为 null 或您期望针对 null 的任何其他值。
推荐阅读
- python - TypeError:无法对切片索引
使用这些索引器 [0.0] - reactjs - 如何使用 Jest 在本机反应中模拟 Auth0 库
- tensorflow2.0 - TensorFlow V2.x 和 tf.keras 的所有随机种子是什么?
- angular - 在 ionic3 中显示离子菜单,无需路由且无需手势
- flutter - 翻译后更改原文
- angular - 角度延迟加载是 2 个模块声明的一部分:AppModule 和 ProductModule
- react-native - cli : 无法与你的守望者交谈
- node.js - Node.js async/await 不等待执行 sql 存储过程的函数返回
- python - 将 pandas DataFrame 与具有预定义索引和列名的矩阵匹配
- laravel - 将 Laravel 控制器设置为 Linux 服务器后,无法从 Laravel 控制器中检索 GET 参数