DAX Trick – Cat or Croissant.
Created a DAX formula that populates the current results of the game (in progress, won, lost) in addition to designing your own buttons for users to start/reset the game.
Part of the Power BI Work Out Wednesday Challenges, reference below.
Data Source:
Data provided on data.world for this exercise.
Challenge Requirements
- Retrieve the data from data.world.
- Add a column to the table (using M or DAX) that sets the sort order for the images such that the order changes each time the dataset is refreshed.
- Present the images in a visual that allows users to select multiple images (hint: the example file uses a custom visual).
- Create one or more DAX measures to determine if the game is in progress, won, or lost based upon the user’s selections. (hint: you’ll want to reference the IsCat column).
- The game is lost if any croissants have been selected.
- The game is won if all of the cats and none of the croissants have been selected
- The game is in progress if no croissants have been selected and there are still cats left to be selected.
- Display the game status on the page in a visual with conditional formatting that changes the background or font color based upon the value.
- Use a bookmark to “reset” the game to be ready to play again with no images selected.
- Design your own images to act as buttons to allow the user start and reset the game. The example uses images made in PowerPoint, but you can use whatever program you would like.
- Include instructions to explain to the user how the game works.
- Colors, background, formatting, and number of pages are at your discretion.
Reference: https://www.workout-wednesday.com/2021/05/04/pbi-2021-w18/
Please look at more fun examples of my skills and projects in my Power BI portfolio.