Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi all,
I went through the posts but couldn't find an answer to the following question (apologies if I missed it).
I have a table that has a field containing a list of tags (I can format this string as I want) but I would like to aggregate data by tag rather than bu the whole string.
Example, I have a table with 2 rows:
ID-1 | <tag1>,<tag2> |
ID-2 | <tag2> |
I would like data to be aggregated this way:
<tag1> 1 record
<tag2> 2 records
Instead of this way:
<tag1>,<tag2> 1 record
<tag2> 1 records
Is there a way I can do that?
Many thanks
Solved! Go to Solution.
Hi @elettra84 ,
You could open query editor and unpivot the tag columns to get an extra column. Then pivot this column to get IDs without aggregation and remove blank tags.
Here is my test file for your reference.
Hi @elettra84 ,
You could open query editor and unpivot the tag columns to get an extra column. Then pivot this column to get IDs without aggregation and remove blank tags.
Here is my test file for your reference.
Is there a clear delimiter that separates the tags? If so, you could add a step in Power Query Editor that does a split column by delimiter and expand the advanced options to split into rows rather than columns.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
I was thinking about this solution, however in that table I also have metrics that shouldn't be duplicated as it will double/triple count them. What do you suggest?
@elettra84 One option in that case is to split the table into 2 - what I sometimes do in this case is right click on the table query and choose 'reference' to create the additional tables. Keep the Key ID column in both tables, but only keep the Tags in one table and only the other info in the other table. Relate them in the data model and carry on as normal.
Does that make any sense?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.