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
ompowerbi
Helper I
Helper I

Total for other players being displayed when it should not appear

Hi, 

Fairly simple question perhaps:

I have a tables like this:

Table1:

ompowerbi_0-1687019182000.png

Table2:

ompowerbi_1-1687019202154.png

For table1, the row with a blank player is showing the sum of scores for all other players from table2. I have got the scores in the first table by creating a relationship with the second table based on the player column. There is no blank row in table1 and don't know where this comes from. I know I can filter out the blank row easily and solve the issue, but I wanted to try and make a leaderboard for each team and this is impacting me doing that. Any suggestions on why this is happening?
Thanks!


1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @ompowerbi ,

 

I tried to reproduce your problem.

vstephenmsft_0-1687226178207.png

This is because the Player column in Table 1 is not equivalent to the Player column in Table 2. In other words, because the Player value in Table 2 does not exist in the Player in Table 1.

You could try to create a measure to solve it.

Measure = CALCULATE(SUM('Table 2'[Score]),FILTER('Table 2',[Player]=MAX('Table 1'[Player])))

vstephenmsft_1-1687226424668.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

 

View solution in original post

5 REPLIES 5
v-stephen-msft
Community Support
Community Support

Hi @ompowerbi ,

 

I tried to reproduce your problem.

vstephenmsft_0-1687226178207.png

This is because the Player column in Table 1 is not equivalent to the Player column in Table 2. In other words, because the Player value in Table 2 does not exist in the Player in Table 1.

You could try to create a measure to solve it.

Measure = CALCULATE(SUM('Table 2'[Score]),FILTER('Table 2',[Player]=MAX('Table 1'[Player])))

vstephenmsft_1-1687226424668.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

 

some_bih
Super User
Super User

Hi @ompowerbi the best practice would be to not have blank rows; to get it your table 1 and table 2 should be the same for key columns, meaning rows in two tables should be the same for connected columns. The rults of calculation later depending on your model, could be affected this blank rows. Go to your model and adapt changes in Table 1 (as table 2 have more rows). Hope this help





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

Proud to be a Super User!






Hi @some_bih, apologies if I am misunderstanding, but there are no blank rows in table 1 and table 2. I don't understand why this blank row is appearing, can you suggets why please? How would you model this data instead?

some_bih
Super User
Super User

Hi @ompowerbi Power BI show blank rows as in two tables there are some rows in one table which are not in second table. In your case probably in Table2 there are some players which are not in Table1. Check this with distinctcount and decide what to do next. Hope this help





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

Proud to be a Super User!






The players in table1 are indeed a subset of the players in table2, is there a way to stop this blank row cropping up, it is affecting the sum of table1 in other calculations?

 

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.

Top Solution Authors
Top Kudoed Authors