【问题标题】:Count hyperlinks in power bi计算 power bi 中的超链接
【发布时间】:2021-09-13 14:45:12
【问题描述】:

我有一个名为“body”的列,在此列中有许多行包含文本中的超链接。

是否可以在 power bi 计算文本中是否存在超链接,然后创建一个新列来显示文本中提供的超链接数量至少在不同的列中显示该文本包含超链接。 TA

【问题讨论】:

    标签: powerbi text-mining counting columnsorting text-manipulation


    【解决方案1】:

    您可以添加Custom Column 来统计<a 在正文中出现的次数(注意a 后面有一个空格)。您可以通过传递Occurrence.All 参数使用Text.PositionOf 函数来做到这一点,因此用于创建列的公式应该是这样的:

    = List.Count(Text.PositionOf([body], "<a ", Occurrence.All))
    

    这将为您提供&lt;a 在正文中出现的次数(即超链接的数量):

    【讨论】:

    • 非常感谢确实有效。我想问另一个与此相关的问题。如果我想计算“
    • 将两个单独的List.Count的结果相加-= List.Count(Text.PositionOf([body], "&lt;a ", Occurrence.All)) + List.Count(Text.PositionOf([body], "https:", Occurrence.All))
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-11-16
    • 1970-01-01
    • 1970-01-01
    • 2022-12-05
    • 2020-07-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多