1

I am met with the challenge of creating a music visualization in Power BI, I have already created the DAX code to come up with a table that will rank the postion of the top 5 songs of the week including the name of the artist and if the song is trending (up) , is going down positions (down) or is maintaning its positions (hold)

the output table looks like this:

|       song      | position |    artist    | trend | image_for_viz |
|:---------------:|:--------:|:------------:|:-----:|:-------------:|
|   Happy Vibes   |     1    |  Alex Gibbs  |   up  |     x.jpg     |
|     Melodies    |     2    |   Amanda S.  |  hold |     y.jpg     |
|     Only You    |     3    |     B,Y.I    |   up  |     z.jpg     |
| 2nite ft. Y-R-U |     4    | Lory & Y-R-U |  hold |     i.jpg     |
|   Green Grass   |     5    |   Jake Hill  |  down |     m.jpg     |

you will notice I also have a column for the .jpg image I need to create something like this:

enter image description here I'd like to create a table so transparent and in such a way that I can upload the image that I need to create the topchart top5 viz above I have gone through so many power bi libraries and i cant seem to find my desired viz or something close to it, from the bottom of my heart thank you so much if you know how to do this I will be forever thankful, also please know that I will be super attentive to upvote and select the best answer thank you so much guys

R_Student
  • 624
  • 2
  • 14

1 Answers1

1

You have two options to solve this:

  1. Use Deneb custom visual. This isn't difficult but is a little involved if you're not familiar with Vega.

  2. Use a combination of native visuals. As you only have 5 datapoints which never increase or decrease, you can layout 5 images for your numbers. Then next to each image, insert a text box with a measure for the specific ranked song and artist. For your up/down icons, you again insert shapes with arrows and circles. You insert both an up and down icon on every line and control the opacity through DAX. i.e. everything is transparent unless your measure states it should be up or down.

Edit: How To.

  1. Insert an image

enter image description here

  1. Create a measure for song as follows:

    1song = CALCULATE( MIN('Table'[song]), 'Table'[position] = 1) 
    
  2. Create a measure for artist as follows:

    1artist = CALCULATE( MIN('Table'[artist]), 'Table'[position] = 1)

  3. Insert a text box next to your number and inside the text box include the two new measures.

enter image description here

  1. Insert two arrows and turn their borders off, making one green and one red. enter image description here

  2. Create a measure as follows:

    1green = IF( CALCULATE( MIN('Table'[trend]), 'Table'[position] = 1) =="up","green", "#00000000" )

  3. And another

    1red = IF( CALCULATE( MIN('Table'[trend]), 'Table'[position] = 1) =="down","red", "#00000000" )

  4. Highlight green arrow and in formatting pane, select Fill and the fx button. Complete as follows:

enter image description here

9 Do same for red arrow and measure

10 That's it. Repeat 5 more times for your other positions.

Final result:

enter image description here

Davide Bacci
  • 16,647
  • 3
  • 10
  • 36