简体   繁体   English

Power BI:如何汇总值?

[英]Power BI: How to summarize values?

I have a table that contains customer survey data.我有一个包含客户调查数据的表。 I have created categories for strength and weakness of the company based on the responses.我根据回答创建了公司优势和劣势的类别。 在此处输入图片说明

I want to score the strengths accordingly.我想相应地对优势进行评分。 Strength 1 columns is scored 3, strength 2 as 2 and strength 3 as 1.强度 1 列的得分为 3,强度 2 为 2,强度 3 为 1。

I have created the output table that I want in excel.我已经在excel中创建了我想要的输出表。

在此处输入图片说明

I need guidance on how to do the same in power bi.我需要有关如何在 power bi 中执行相同操作的指导。

In powerbi create an additional DictCategory table with all strength Category.在 powerbi 中创建一个额外的 DictCategory 表,其中包含所有强度类别。 Setup inactive relationships to your survey table (Str1 Category/ Str2 Category etc);设置与您的调查表的非活动关系(Str1 类别/ Str2 类别等); Next create measures:接下来创建措施:

Strength1 = calculate( count('Survey'), USERELATIONSHIP(DictCategory[Category],'Survey'[Str1 Category]))
Strength2 = calculate( count('Survey'), USERELATIONSHIP(DictCategory[Category],'Survey'[Str2 Category]))
Strength3 = calculate( count('Survey'), USERELATIONSHIP(DictCategory[Category],'Survey'[Str3 Category]))

Last one:最后一个:

SumOfStrength = [Strength1] * 3 + [Strength2]*2 + [Strength3]

Drag everything to table visualization (Strength Category from DictCategory),将所有内容拖到表格可视化(来自 DictCategory 的强度类别),

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

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