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

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.

Reply
Anonymous
Not applicable

Need Help with Relationships

Hey guys,

 

Thanks for taking the time to look into this message.

 

I have two tables: (please reference tables below)

  • ID Table
  • Gear Table

I have built a one to many relationship between the ID Table and Gear Table so that I can track the gear I have for each Sport. I am now trying to put together a visual that will show me the count of sports per each brand. The idea would be to have a bar graph in which the axis would be the brand and the values would be the sports. In this particular case we have three different brands (Nike, DeMarini & Under Armour) and across those brands we have two sports (baseball, football). What type of relationship am I missing here so that I can put together this visual?

 

ID Table

IDSport Name
1Baseball
2Softball
3Football
4Basketball
5Hockey
  

 

Gear Table

IDSport NameGearBrand
1BaseballBat

DeMarini

1BaseballGloveNike
1BaseballHatNike
2FootballHelmetNike
2FootballUniformUnder Armour
1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try this measure:

 

Measure = DISTINCTCOUNT(Gear[Sport Name])

 

Choose Clustered Bar Chart, it shows the distinct count of sports for each brand:

5.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

View solution in original post

2 REPLIES 2
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try this measure:

 

Measure = DISTINCTCOUNT(Gear[Sport Name])

 

Choose Clustered Bar Chart, it shows the distinct count of sports for each brand:

5.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

vivran22
Community Champion
Community Champion

Hello @Anonymous,

 

What is value you are looking in terms of count? Can you share the expected result as per the sample table shared?

 

Capture.PNG

 

Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂

https://www.vivran.in/

Connect on LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.