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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors