简体   繁体   English

Power BI 中的数据分析

[英]Data profiling in Power BI

I want to profile every single data table I have in my Power BI report.我想分析 Power BI 报告中的每个数据表。 By data profile I mean something like this:通过数据配置文件,我的意思是这样的:

数据配置文件示例

Are there ways to make a data profile view in Power BI?有没有办法在 Power BI 中创建数据配置文件视图? DAX measure or calculated columns? DAX 度量或计算列?

Alternatively, you can also recommend other data quality tools that can handle such tasks since I find it a bit difficult to achieve this result in Power BI.或者,您也可以推荐其他可以处理此类任务的数据质量工具,因为我发现在 Power BI 中实现此结果有点困难。

Now I feel dumb after writing a manual query that did what it turns out Table.Profile does in one shot.现在我在编写了一个手动查询后感觉自己很愚蠢,该查询完成了 Table.Profile 一次性完成的工作。 However I will mention you can automatically get a profile for every table in your data set by using the #shared reference and filtering down to the tables:但是,我会提到您可以通过使用 #shared 引用并过滤到表自动获取数据集中每个表的配置文件:

let
    Source = #shared,
    #"Converted to Table" = Record.ToTable(Source),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "TableCheck", each Type.Is(Value.Type([Value]), type table)),
    #"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([TableCheck] = true)),
    #"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each [Name] <> "NAME_OF_THIS_QUERY"),
    #"Added Custom1" = Table.AddColumn(#"Filtered Rows1", "Profile", each Table.Profile([Value])),
    #"Expanded Profile" = Table.ExpandTableColumn(#"Added Custom1", "Profile", {"Column", "Min", "Max", "Average", "StandardDeviation", "Count", "NullCount", "DistinctCount"}, {"Profile.Column", "Profile.Min", "Profile.Max", "Profile.Average", "Profile.StandardDeviation", "Profile.Count", "Profile.NullCount", "Profile.DistinctCount"})
in
    #"Expanded Profile"

And replace "NAME_OF_THIS_QUERY" with whatever you name the query so it doesn't try to profile itself.并将“NAME_OF_THIS_QUERY”替换为您为查询命名的任何内容,这样它就不会尝试分析自身。

In the query editor, you can use the Table.Profile function on any table.在查询编辑器中,您可以对任何表使用Table.Profile 函数

You can do multiple ones simultaneously like this:您可以像这样同时执行多个操作:

= Table.Combine({Table.Profile(Table1),Table.Profile(Table2)})

Edit:编辑:

To see the profile, create a new Blank Query and define it as = Table.Profile(Table1) .要查看配置文件,请创建一个新的空白查询并将其定义为= Table.Profile(Table1) If you open the Advanced Editor, the M code looks like this:如果打开高级编辑器,M 代码如下所示:

let
    Source = Table.Profile(Table1)
in
    Source

Power BI has a built-in data profiler Power BI 有一个内置的数据分析器

  1. Open Power BI and refer to the menu ribbon打开 Power BI 并参考菜单功能区
  2. Click Home点击首页
  3. Click Edit Queries单击编辑查询
  4. Click View点击查看
  5. Select Column Profile to view stats about your data选择列配置文件以查看有关您的数据的统计信息

Power BI 功能区

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM