cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Measures for NBA Analysis

Hi community 🙂 I am new in Power BI and I got a very difficult exercise about the NBA and I need some help with DAX. I have 2 tables with Teams and Player's information on the total of points per player/team, converted/not converted points of 2 and 3, rebounds, turnovers, etc... (they are all in Portuguese).

 

Some parts I need help with:

 

  1. I'm trying to create the PERCENTUAL of points of 2, 3, and free throws that must worth and I change the panel from teams to players, just like the example below (1 Team, 2 Players Individually): 

Screenshot 2021-01-15 204512.pngScreenshot 2021-01-15 204511.png

I have already use the DIVIDE formula, like this: 

 

 

But this formula returns me the PERCENTUAL of the TOTAL I guess, but it's different from the result above (both of the results are from the Miami Heat Team);

 

3ptteste = var totalptsgeral = CALCULATE(
SUM(F_JogadoresArremessos[Pontos em Núm]),
ALL(F_JogadoresArremessos[Pontos em Núm]),
F_JogadoresArremessos[Convertido (1 = sim , 0 = não)] = 1)
return
DIVIDE(Medidas[M 3PTS], totalptsgeral, 0)

 

2. I need the AVERAGE of Steals, Turnovers, faults, rebounds, and PPG (Points per Game), I think the same formula would worth for all these contents that the report needs. The problem is that I got only 1 table with dates "F_JogadoresArremessos", with all player's throw of 2 and 3 points (so I can do the PPG), but not with each rebound, turnover as the exercise asks to do, I got really stuck and I don't know how to do it. Here's the formula I used for PPG, the problem is the same, results don't match;Screenshot 2021-01-15 211656.pngScreenshot 2021-01-15 211916.pngScreenshot 2021-01-15 211947.png

 

 

M PPJ = AVERAGEX(VALUES(F_JogadoresArremessos[Data do Jogo]),[M PTS Totais])

//sum of points of 2 and 3
M PTS Totais = Medidas[M 2PTS] + Medidas[M 3PTS]

//Total of converted points of 3
M 3PTS = CALCULATE(SUM(F_JogadoresArremessos[Pontos em Núm]),FILTER(F_JogadoresArremessos,F_JogadoresArremessos[Pontos em Núm] = 3),F_JogadoresArremessos[Convertido (1 = sim , 0 = não)] = 1)

 

 

3. The last question should be very simple, haha, It is how can I do this visualization below; Screenshot 2021-01-15 212559.png

 

I'll be very grateful if someone helps me with these questions if even answer one of them, it would help me a lot ❤️

If you have a PBIX of any NBA Data Report, share it with me, please! It will help me too 😄

 

(Sorry if you got confused with the language, I used Google Translator)

 

Here's the database:

BD - Jogadores.xlsx - Google Drive 

BD - Times.xlsx - Google Drive 

1 REPLY 1
lbendlin
Super User
Super User

For the graphic you can use the HTML5 custom visual and you create your data points in SVG format.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors