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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mpicca13
Resolver IV
Resolver IV

Concatenating Multiple values from the same column based on other column values

In my Test Table, I have column SearchShelfTerm which can contain up 3 distinct values based on my ranking measure.

I need to create an additonal column which concatenates all the 1-3 values in the SearchShelfTerm column.

I have additonal columns which indicate true/false for the term being ranked in the appropriate column group.

 

End result should be another column showing the following in each cell of each row:

cold brew coffee, cold coffee, starbucks doubleshot

 

See image below of current state:

Capture.PNG

 

End Result:

Capture1.PNG

1 ACCEPTED SOLUTION

I needed to concantenate only the values in the top 3 using my rank measure.

I figured out a solution to this.

Solution in the image below:

Capture.PNG

 

View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @mpicca13 

According to your description, I guess you want to Concatenate all the [SearchShellTerm] grouped by [Product Name], you can try this calculated column:

Concatenated value =

var _first=CALCULATE(MAX('Table'[SearchShellTerm]),FILTER('Table',[Product Name]=EARLIER([Product Name])&&[First place]=TRUE()))

var _second=CALCULATE(MAX('Table'[SearchShellTerm]),FILTER('Table',[Product Name]=EARLIER([Product Name])&&[Second place]=TRUE()))

var _third=CALCULATE(MAX('Table'[SearchShellTerm]),FILTER('Table',[Product Name]=EARLIER([Product Name])&&[Third place]=TRUE()))

return COMBINEVALUES(" , ",_first,_second,_third)

 

And you can get what you want, like this:

v-robertq-msft_0-1606383475573.png

 

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I needed to concantenate only the values in the top 3 using my rank measure.

I figured out a solution to this.

Solution in the image below:

Capture.PNG

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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