我正在尝试在PowerBi中设计模型。
我已经用事实表开发了一个模型。
1- SurveyFact为
Respondant| Date | Question | IdResponse | Count
Frank | 201801 | Where do you live ? |Germany | 1
Stephane | 201801 | Where do you live ? |France | 1
Frank | 201801 | What Brand is the best ? |Coca | 1
Stephane | 201801 | What Brand is the best ? |Pepsi | 1
Frank | 201801 |Does this Brand inspire quality to you ? Coca | Yes | 1
Frank | 201801 |Does this Brand inspire quality to you ? Pepsi| No | 1
Stephane | 201801 |Does this Brand inspire quality to you ? Coca | No | 1
Frank | 201801 |Does this Brand inspire quality to you ? Pepsi| No | 1
Stephane | 201801 |Does this Brand inspire quality to you ? Coca | No | 1
Frank | 201801 |Does this Brand inspire quality to you ? Pepsi| No | 1
我遇到的困难是我必须开发一个根据品牌过滤的报告。
我可以在此模型中创建维度品牌吗?
谢谢您的帮助。
答案 0 :(得分:0)
如果要根据用户给出的答案进行操作,则需要知道什么是品牌问题。为此,我添加了一个专栏:
接下来要做的是按问题过滤,然后选择该列并取出重复项。在编辑器中添加一个空白查询,并将其重命名为Brands。打开高级编辑器,并在下面输入过去的代码(请注意,您已经有不同的来源)
let
Source = Sheet1,
#"Filtered Rows" = Table.SelectRows(Source, each ([BrandQuestion] = 1)),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{" IdResponse "}),
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns")
in
#"Removed Duplicates"
现在您有了品牌表。