在Power BI中搜索列

huangapple go评论73阅读模式
英文:

Search in Column Power BI

问题

我在Powerbi中有一个包含邮政编码和城市的列,我想要将邮政编码单独放在一列中。

我的问题是,不同国家的邮政编码长度不同。

有些有5个字符,有些有4个,比如7400 Herning12307 Berlin

邮政编码和城市之间用一个“空格”分隔。

是否可能有一段代码,可以返回直到第一个“空格”之前的所有字符?

谢谢。

英文:

I have a column in Powerbi with postal code and City in the same cell.
I would like to have Zipcode in a column alone.

My problem is that the length of postal code varies from country to country.

Some have 5 characters others have 4 ex. 7400 Herning, 12307 Berlin

The postal code and city are separated with a "space".

Is it possible to have a code that return all characters that returns everything until the first "space"?

Thanks.

答案1

得分: 0

你可以使用Power Query中的“从示例创建列”来实现这一点。

英文:

You can achieve this using Column From Examples in Power Query

在Power BI中搜索列

在Power BI中搜索列

答案2

得分: 0

  1. 使用分隔符拆分列

  2. 按数字到非数字拆分列

英文:
  1. Split Column by Delimiter

在Power BI中搜索列

在Power BI中搜索列

  1. Split Column by Digit to Non-Digit

在Power BI中搜索列

huangapple
  • 本文由 发表于 2023年6月26日 20:53:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76556884.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定