[英]Creating a Table Showing All Pair Combinations of Values in 1 Column Based on Values in a Different Column - Excel / Power BI
I have this table showing the names of the employees who worked on jobs where each job can be worked on by more than one employee:我有这张表显示从事工作的员工的姓名,每项工作可以由多个员工从事:
And I would like to create a new table comparing the names of the employees who worked on the same job so we could eventually compare their answers, two employees at time.我想创建一个新表来比较从事同一工作的员工的姓名,以便我们最终可以比较他们的答案,一次是两名员工。 It should look something like this:
它应该看起来像这样:
So if a job was answered by 4 people, then I should end up with 6 rows for the job (4C2) and if it was answered by 16 people, then I should have 120 rows (16C2).因此,如果一项工作由 4 人回答,那么我应该以 6 行结束该工作(4C2),如果它由 16 人回答,那么我应该有 120 行(16C2)。
Is there any way I could do this in Excel or in Power BI?有什么办法可以在 Excel 或 Power BI 中做到这一点?
In Power Query
:在
Power Query
中:
Unpivot Columns
Unpivot Columns
Remove Duplicates
Remove Duplicates
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.