Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am trying to format a dataset for venn diagram in power bi. I want to find out how many employees have done Morning, afternoon and evening shifts and combination of all three. For example, an employee 1 has done both Afternoon and Evening shift.
Current DataSet :
Employee ID | Morning | Afternoon | Evening |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 0 |
2 | 1 | 0 | 0 |
3 | 0 | 1 | 0 |
4 | 1 | 0 | 0 |
4 | 0 | 1 | 0 |
4 | 0 | 0 | 1 |
Expected result:
Employee ID | Morning | Afternoon | Evening |
1 | 0 | 1 | 1 |
2 | 1 | 0 | 0 |
3 | 0 | 1 | 0 |
4 | 1 | 1 | 1 |
DistinctCount of Employee ID | Morning | Afternoon | Evening |
0 | 0 | 0 | 0 |
1 | 1 | 0 | 0 |
1 | 0 | 1 | 0 |
0 | 0 | 0 | 1 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 1 |
0 | 1 | 0 | 1 |
1 | 1 | 1 | 1 |
Any views on this topic is appreciated !
Thanks
Solved! Go to Solution.
Hi @Anonymous
You may create the tables with SUMMARIZE Function.Attached sample file for your reference.
Summarize = SUMMARIZE ( 'DataSet', 'DataSet'[Employee ID], "Morning", MAX ( 'DataSet'[Morning] ), "Afternoon", MAX ( 'DataSet'[Afternoon] ), "Evening", MAX ( 'DataSet'[Evening] ) )
Regards,
Hi @Anonymous
You may create the tables with SUMMARIZE Function.Attached sample file for your reference.
Summarize = SUMMARIZE ( 'DataSet', 'DataSet'[Employee ID], "Morning", MAX ( 'DataSet'[Morning] ), "Afternoon", MAX ( 'DataSet'[Afternoon] ), "Evening", MAX ( 'DataSet'[Evening] ) )
Regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |