Dat*_*sia 5 line-breaks m powerquery powerbi powerbi-desktop
我在 Power Query (Power BI Desktop) 中使用此代码连接了四列(以防止空值链接在一起):
= Text.Combine(List.Select(
{ [Col1], [Col2], [Col3], [Col4]
}, each _<> "" and _ <> null),"; "))
Run Code Online (Sandbox Code Playgroud)
我想知道是否有办法插入换行符而不是“;”分隔符;这会让我的视觉效果看起来更整洁!
提前致谢!
尝试使用“#(lf)”或“#(cr)”代替“;”
= Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(List.Select({ [Column1], [Column2], [Column3], [Column4]}, each _<> "" and _ <> null),"#(lf)"))
Run Code Online (Sandbox Code Playgroud)
或者
= Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(List.Select({ [Column1], [Column2], [Column3], [Column4]}, each _<> "" and _ <> null),"#(cr)"))
Run Code Online (Sandbox Code Playgroud)
确保将 Excel 中的单元格格式设置为自动换行
您可以使用 Lines.ToText ( https://learn.microsoft.com/en-us/powerquery-m/lines-totext ),而不需要可选的 lineSeparator。
归档时间: |
|
查看次数: |
22394 次 |
最近记录: |