March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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 Name | Game Label | Score |
PL1 | G1 | 183 |
PL1 | G2 | 213 |
PL1 | G3 | 199 |
PL2 | G1 | 225 |
PL2 | G2 | 171 |
PL2 | G3 | 175 |
PL3 | G1 | 196 |
PL3 | G2 | 223 |
But the final result report should look like this:
Player Name | G1 | G2 | G3 | Game Count | Total Score | AVG Score |
PL1 | 183 | 213 | 199 | 3 | 595 | 198.33 |
PL2 | 225 | 171 | 175 | 3 | 571 | 190.33 |
PL3 | 196 | 223 | 2 | 419 | 209.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
Solved! Go to Solution.
Hi @Lucian ,
I have a solution here (I used a normal table visual):
First I pivot the table in Power Query on the column Game Label and Values column Score:
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.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! |
#proudtobeasuperuser |
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.
@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.
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.
Hi @Lucian ,
I have a solution here (I used a normal table visual):
First I pivot the table in Power Query on the column Game Label and Values column Score:
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.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! |
#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
@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.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |