cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Microsoft v-cherch-msft
Microsoft

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
Microsoft v-cherch-msft
Microsoft

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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors