2023 Week 01 | Power BI: Use DAX to control visual display

Introduction

Welcome to Workout Wednesday 2023, Power BI edition!

If this is your first time joining us, we’re happy you’re here. The goal of this initiative is to help you build your Power BI skills. We provide the data and the instructions, and you build the visuals! We hope you have fun and learn a new technique or skill as you go through the next 52 weeks. If you are new to Power BI, we recommend you start with the 2021 challenges.

This week we’re teaming up with the Tableau challenge analyzing Rugby World Cup data, comparing run metres to number of passes by player and team. I don’t know anything about rugby but I had a lot of fun creating this report! 

Requirements

  • Get and Transform Data
    • Get data from Google sheets using the Google sheets connector in Power BI
    • If you do not have a Google account, get data from Excel
    • Keep only the data you need and name things in a way that makes sense to you.
      • I created three queries: dimPlayer, dimGame, and factStats
      • Filter all queries to include only the Men’s Rugby League World Cup
    • After loading data to the model, double check data types, particularly for the player image
    • If you created multiple queries, create relationships between queries
  • Create Measures
    • Create a measures using DAX to display the following data points when a single player is selected:
      • player name
      • player team
      • player image
      • bar chart for All Run Metres
      • bar chart for Passes
      • Hint: start with HASONEVALUE 

***If you want to focus on visuals only, feel free to download and use the starter Power BI desktop file. This contains the data model and includes measures.

  • Add Visuals
    • All visuals in this report are found natively in Power BI – there are no custom visuals required.
    • Add a slicer containing player name.
    • Add two card visuals to display the player name and team. Use measures in these cards to display the values only when a selection has been made.
    • Add a scatterplot with All Run Metres on the X Axis and Passes on the Y Axis
      • ensure data are displayed by player and by game. This can be accomplished in a couple of different ways.
    • Add a table visual to display the player image using the measure you created to show the image only if a single player is selected.
    • Add two bar charts to display the Run Metres and Passes using the measures you created.
      • I used a measure for the chart titles as well, so they only display upon selection.
    • You may need to adjust the layering of your visuals (hint: use the selection pane).
    • I added a landing page using a button and an image. This is optional.
    • Check your tab order and add alt text to ensure your report is accessible.
  • Share Your Work
    • Your visuals do not have to match the challenge exactly! Get creative and share your work with us on social media.
    • If you’re completing both the Tableau and the Power BI challenge, share your thoughts on the differences on social media and/or in the comments here!

Dataset

This week uses collected data from the RLWC website which can be found here.

Share

After you finish your workout, share on Twitter using the hashtags #WOW2022 and #PowerBI, and tag @JSBaucke@MMarie, @shan_gsd, and @KerryKoloskoAlso make sure to fill out the Submission Tracker so that we can count you as a participant this week in order to track our participation throughout the year. 

Solution

Download the pbix file here.

2 thoughts on “2023 Week 01 | Power BI: Use DAX to control visual display”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top