Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Help with data.
I have a data table from Spotify that contains a column recording the number of artists, and some cells have more than one artist. I want a function or method to create a card that shows the correct total number of artists and is also interactive when I use filters. For example, if I select a song with three artists, the card should display three.
Can I create a separate table and how do I link it to the original table? When I created the relationship, the one-to-many setup is correct, but the card does not interact.
I have attached an example of part of the table, and I may provide a link to the full data
Solved! Go to Solution.
Thanks for the reply from parry2k , please allow me to provide another insight:
Hi @Mahmoud23 ,
I couldn't open your pbix link, I created my own relevant sample data:
Here are the steps you can follow:
1. Duplicate the table in Power Query, delete columns for splitting into multiple columns, select all columns for Unpivot Columns.
Select [track_name] -- Remove
Table_copy – select [act_name] – Split column – By Delimiter.
Select all columns – Unpivot Columns.
Select [Attribute] – Remove.
Select [Value] – Duplicate Column.
2. Create measure.
Measure =
var _select=SELECTEDVALUE('Table'[track_name])
var _art=MAXX(FILTER(ALL('Table'),'Table'[track_name]=_select),[art_name])
var _table=
FILTER('Table_copy',CONTAINSSTRING(_art,[Value])=TRUE())
var _table2=
ADDCOLUMNS(
_table,"Count",COUNTX(FILTER(ALL('Table'),CONTAINSSTRING('Table'[art_name],[Value])=TRUE()),[track_name]))
return
CONCATENATEX(_table2,[Value]&"-"&[Count]," ")
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the reply from parry2k , please allow me to provide another insight:
Hi @Mahmoud23 ,
I couldn't open your pbix link, I created my own relevant sample data:
Here are the steps you can follow:
1. Duplicate the table in Power Query, delete columns for splitting into multiple columns, select all columns for Unpivot Columns.
Select [track_name] -- Remove
Table_copy – select [act_name] – Split column – By Delimiter.
Select all columns – Unpivot Columns.
Select [Attribute] – Remove.
Select [Value] – Duplicate Column.
2. Create measure.
Measure =
var _select=SELECTEDVALUE('Table'[track_name])
var _art=MAXX(FILTER(ALL('Table'),'Table'[track_name]=_select),[art_name])
var _table=
FILTER('Table_copy',CONTAINSSTRING(_art,[Value])=TRUE())
var _table2=
ADDCOLUMNS(
_table,"Count",COUNTX(FILTER(ALL('Table'),CONTAINSSTRING('Table'[art_name],[Value])=TRUE()),[track_name]))
return
CONCATENATEX(_table2,[Value]&"-"&[Count]," ")
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Help me please!
I have a data table from Spotify that contains a column recording the artists & another the number of artists, and some cells have more than one artist. I want a function or method to create a card in power bi that shows the correct total number of artists and is also interactive when I use filters. For example, if I select a song with three artists, the card should display three.
Can I create a separate table and how do I link it to the original table? When I created the relationship, the one-to-many setup is correct, but the card does not interact.
I provided a link to the full data.
& in your opinion, what are the best additional modifications i can make to this data to extract good results that i can use in a power bi report.
@Mahmoud23 duplicate post - I already replied to the original post/
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I Attached the data in a new post as the first solution didn't work with me
@Mahmoud23 provide more details, what didn't work? Your reply is not helpful what is not working?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Mahmoud23 there are few approaches on how you can solve it?
One approach is:
- add an index column to the table - calling track table
- refer to track table (after the index column is added), let's call it artist table
- remove all other columns except index and artist column from artist table
- split artist column by delimiter (comma) and under advance options (of split dialog box), select rows
- close and apply
now you have two tables one is called title and the other is artist. set relationship between title and artist tables on the index column, and set the cross filter direction to both (not recommended but for testing let's do it)
visualize your data, and in the slicer use artist column from the artist table, as you select different artists, it will show track based on the select artists (or visual will be interactive)
Hope this helps, tweak the solution as you see fit.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks but i already did that way & That didn't Work 😓
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.