Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

5 REPLIES 5
james8765432345
New Member

Hi Lucian,

You can achieve this in Tableau by pivoting the game data into columns for each game, then using calculated fields for Game Count, Total Score, and AVG Score. Create a table visualization to display the summarized results as you described.

Kind regards.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.