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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
edu_210981
New Member

How to count the number of tracks in Deneb using a dataset with multiple tracks per row

Hello, I am using Deneb to create a chart that shows the number of tracks in my dataset “Spotify Dataset (3)”.

The problem is that my dataset has multiple tracks per row, separated by commas. For example, row 1 contains the information for the tracks “Shape of You” and “Perfect”, by the band Ed Sheeran. I tried to use the measure _Track = count('Spotify Dataset (3)'[track_name]), but it only returns the number of rows, which is 953.

I want to count the number of tracks in my dataset, not the number of rows. How can I do that in Deneb? I have tried several types of measures, but none of them worked. Can anyone help me? Thank you.

In short:

I want to create this Deneb HeatMap with Park bars, link:
https://www.youtube.com/shorts/E2wjo4FaVjk

Code Github:

https://github.com/PowerBI-tips/Deneb-Templates/blob/main/templates/heatmap%20with%20bars%20-%20red%...

on line 41 I changed the KPI to the measure name _Track, but it doesn't work either

Thank you very much for any help!Deneb - heatmap.png

4 ACCEPTED SOLUTIONS
giammariam
Super User
Super User

Hey @edu_210981, let me know if the logic in this spec will help.

The important part:

  "transform": [
    {"calculate": "split(datum['track'], ',')", "as": "track"},
    {"flatten": ["track"]}
  ],

giammariam_0-1705173117609.png

If this is enough to get you going please consider liking this reply and choosing it as the solution. Otherwise, I'm happy to help further.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

View solution in original post

giammariam
Super User
Super User

Hey @edu_210981, did this end up working? Happy to help further if not. 



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

View solution in original post

Madison, Thank you very much for all your contribution and sharing knowledge to the entire community. I got the resolution, it worked here, after taking it easy and analyzing it, it was actually simple, lol.... Hugs, Edu | São Paulo | Brazil

View solution in original post

Madison,

Thank you very much for all your contribution and sharing knowledge to the entire community.

I got the resolution, it worked here, after taking it easy and analyzing it, it was actually simple, lol....

Hugs,

Edu | São Paulo | Brazil

View solution in original post

4 REPLIES 4
giammariam
Super User
Super User

Hey @edu_210981, did this end up working? Happy to help further if not. 



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!
giammariam
Super User
Super User

Hey @edu_210981, let me know if the logic in this spec will help.

The important part:

  "transform": [
    {"calculate": "split(datum['track'], ',')", "as": "track"},
    {"flatten": ["track"]}
  ],

giammariam_0-1705173117609.png

If this is enough to get you going please consider liking this reply and choosing it as the solution. Otherwise, I'm happy to help further.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

Madison,

Thank you very much for all your contribution and sharing knowledge to the entire community.

I got the resolution, it worked here, after taking it easy and analyzing it, it was actually simple, lol....

Hugs,

Edu | São Paulo | Brazil

Madison, Thank you very much for all your contribution and sharing knowledge to the entire community. I got the resolution, it worked here, after taking it easy and analyzing it, it was actually simple, lol.... Hugs, Edu | São Paulo | Brazil

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.