cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ankbaner Regular Visitor
Regular Visitor

Formatting dataset for Venn diagram

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 IDMorningAfternoon Evening
0000
1100
1010
0001
0110
1011
0101
1111

Any views on this topic is appreciated !

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-cherch-msft Super Contributor
Super Contributor

Re: Formatting dataset for Venn diagram

Hi @ankbaner 

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,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft Super Contributor
Super Contributor

Re: Formatting dataset for Venn diagram

Hi @ankbaner 

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,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 190 members 2,065 guests
Please welcome our newest community members: