Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PowerBeeEye
Employee
Employee

Count unique rows in related table including zero

Hello,

 

I have two tables that look like this:

 

GroupNames
Group A
Group B
Group C

 

CompanyNameGroupNameMemberName
CompanyAGroupAMemberA
CompanyAGroupAMemberA
CompanyAGroupAMemberB
CompanyAGroupBMemberC
CompanyBGroupAMemberD

 

I would like to create a visualizer with a table that looks like this:

GroupNameMemberCount
GroupA2
GroupB1
GroupC0

 

Note that MemberCount counts only unique MemberName instances  for each GroupName.

There would be a slicer for CompanyName.

 

Thanks in advance!

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @PowerBeeEye ,

 

Try this:

 

1. Be careful of unnecessary spaces. Remove the sapces in the table below.

GroupNames
Group A
Group B
Group C

 

2. Create relationships.

relation.JPG

 

3. Create a measure.

Count = DISTINCTCOUNT(Company[MemberName])+0

count.gif

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @PowerBeeEye ,

 

Try this:

 

1. Be careful of unnecessary spaces. Remove the sapces in the table below.

GroupNames
Group A
Group B
Group C

 

2. Create relationships.

relation.JPG

 

3. Create a measure.

Count = DISTINCTCOUNT(Company[MemberName])+0

count.gif

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

Nathaniel_C
Super User
Super User

Hi @PowerBeeEye ,

Please check your expected results, you have four unique choices, and only 3 count.

Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




The expected results table only shows data from CompanyA, but otherwise, I believe it looks good

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors