Forum Discussion

rebam12's avatar
rebam12
Icon for Helper I rankHelper I
1 year ago
Solved

olympic dataset queries

i download dataset from kaggle i am trying to create a dashboard but i face some problems

1) i create a bar chart top countries by medals. here i dont want blank rows in bar chart. like in medal column some values has empty .. soo i want to filter that out

2) 2nd sheet chart is gender participant over time .. i unable to create relationship between biogrpahy table and games summary table.. from biograph i select sex, total female athlete and total male athlete and year from summary table.. like i want to show till now how many male and female particpant in olympic.. 

 

i attached dashboard and link of dataset please check and let me know 

 

https://www.kaggle.com/datasets/muhammadehsan02/126-years-of-historical-olympic-dataset

 

power bi flle

https://filebin.net/hj7bquz6p8cfrk5y

  • Hi rebam12 
    According to the first graph, you can filter out the blanks :

    According to the second question :
    You don't have data about the sex in the summary table so you need to count it from the events table.
    You can create these 2 measures to rich this goal:
    1.

    Count_male = CALCULATE(DISTINCTCOUNT('Olympic_Athlete_Event_Details'[athlete_id]),'Olympic_Athlete_Biography'[sex]= "Male")

    count_female = CALCULATE(DISTINCTCOUNT('Olympic_Athlete_Event_Details'[athlete_id]),Olympic_Athlete_Biography[sex]="Female")

    The updated pbix is attached

    If my answer was helpful please give me a Kudos and accept as a Solution.



4 Replies

  • Hi rebam12 
    According to the first graph, you can filter out the blanks :

    According to the second question :
    You don't have data about the sex in the summary table so you need to count it from the events table.
    You can create these 2 measures to rich this goal:
    1.

    Count_male = CALCULATE(DISTINCTCOUNT('Olympic_Athlete_Event_Details'[athlete_id]),'Olympic_Athlete_Biography'[sex]= "Male")

    count_female = CALCULATE(DISTINCTCOUNT('Olympic_Athlete_Event_Details'[athlete_id]),Olympic_Athlete_Biography[sex]="Female")

    The updated pbix is attached

    If my answer was helpful please give me a Kudos and accept as a Solution.



    • rebam12's avatar
      rebam12
      Icon for Helper I rankHelper I

      hi thanks for ur reply

      i already create KPI total male athelete like this .

      Male athlete = CALCULATE(count(Olympic_Athlete_Biography[athlete_id]),Olympic_Athlete_Biography[sex]="Male")

      why not you call athlete_id from biography table ?

      • Ritaf1983's avatar
        Ritaf1983
        Icon for Super User rankSuper User

        Because the biography doesn't have the year of the event and you wanted the table by the year...

        If my answer was helpful please give me a Kudos and accept as a Solution.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi rebam12 ,

    If your question is solved, please mark Ritaf1983 's answer as a solution, if not, you can ask your question here.Let me see what I can do.

     

    Best Regards,
    Wenbin Zhou