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
Lucian
Responsive Resident
Responsive Resident

Create a game leaderboard with individual game details

Hi,

I'm trying to help a friend that need to create some report for a bowling tournment. Until here it seems preety fun. 🙂

Each player will have to play 6 games (labeled as G1...G6) and the data is recorded in a simple table:

 

Player NameGame LabelScore
PL1G1183
PL1G2213
PL1G3199
PL2G1225
PL2G2171
PL2G3175
PL3G1196
PL3G2223

 

But the final result report should look like this:

 

Player NameG1G2G3Game CountTotal ScoreAVG Score
PL11832131993595198.33
PL22251711753571190.33
PL3196223 2419209.50

 

Without Game Count and AVG Score it would be just a plain and simple matrix... but I have no clue how could I have the above picture into a single visual.

 

Is it possible to obtain it?

 

Kind Regards,

Lucian

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @Lucian ,

 

I have a solution here (I used a normal table visual):

tomfox_0-1644528385897.png

 

First I pivot the table in Power Query on the column Game Label and Values column Score:

tomfox_1-1644528504683.png

 

After that, I created the measures:

Game Count = 
IF ( ISBLANK ( MAX ( Table16[G1] ) ), 0, 1 ) +
IF ( ISBLANK ( MAX ( Table16[G2] ) ), 0, 1 ) +
IF ( ISBLANK ( MAX ( Table16[G3] ) ), 0, 1 )
Total Score = 
SUMX ( Table16, Table16[G1] + Table16[G2] + Table16[G3] )
Average Score = 
DIVIDE ( [Total Score], [Game Count] )

 

Hope this helps!

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 

 

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@tackytechtom it is a great solution but unfortunately not scalable, if tomorrow there is another Game (G4 and G5), it means you have to come back to the measure and include the logic for the new games. Just my 2 cents.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

tackytechtom
Super User
Super User

Hi @Lucian ,

 

I have a solution here (I used a normal table visual):

tomfox_0-1644528385897.png

 

First I pivot the table in Power Query on the column Game Label and Values column Score:

tomfox_1-1644528504683.png

 

After that, I created the measures:

Game Count = 
IF ( ISBLANK ( MAX ( Table16[G1] ) ), 0, 1 ) +
IF ( ISBLANK ( MAX ( Table16[G2] ) ), 0, 1 ) +
IF ( ISBLANK ( MAX ( Table16[G3] ) ), 0, 1 )
Total Score = 
SUMX ( Table16, Table16[G1] + Table16[G2] + Table16[G3] )
Average Score = 
DIVIDE ( [Total Score], [Game Count] )

 

Hope this helps!

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 

 

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Hi @tackytechtom ,

 

Even is not as flexible I would like to be... is still better than nothing, because I have to follow that report format.

I think I will use this approach until I could find a better one. 😉

 

@parry2k if you could point me out to some articles on how to use your workaround, it might help, because the real project is based on 6 or 7 games. I have to check if this limits will be increased over time.

 

Kind Regards,

Lucian

parry2k
Super User
Super User

@Lucian It is a great question and unfortunately there is no functionality in Matrix visual to show what some of the calculations only show at the total level. There are lots of work around using disconnected tables but nothing out of the box.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.