Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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
  • Hi,

     

    Please try this measure:

     

    Measure = DISTINCTCOUNT(Gear[Sport Name])

     

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

    Hope this helps.

     

    Best Regards,

    Giotto Zhi

2 Replies

  • vivran22's avatar
    vivran22
    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?

     

     

    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

  • v-gizhi-msft's avatar
    v-gizhi-msft
    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:

    Hope this helps.

     

    Best Regards,

    Giotto Zhi