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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Alex_RM
Frequent Visitor

ALLSELECTED, but within the same visual

Hello,

 

I need to perform a string concatenation.

In my report, I have a single Deneb visual (running on vega-lite). Within its dataset, I want to add a column named 'Concatenation' to concatenate all values in 'Value to concatenate', for the selected rows (when I click on them), and appends the result to the dataset, no matter if this row is currently selected or not.

 

Here is the table in its basic state:

KeyValue to concatenateConcatenation
avalueAvalueA, valueB, valueC
bvalueBvalueA, valueB, valueC
cvalueCvalueA, valueB, valueC

 

Here is the expected result when I select some of the rows (here in bold):

KeyValue to concatenateConcatenation
avalueAvalueA, valueC
bvalueBvalueA, valueC
cvalueCvalueA, valueC

 

 

I tried some DAX formulas with ALLSELECTED, which doesn't seem to work when used within the same visual (but works very well when used on a separated table).

 

Maybe is there a solution in DAX, or in vega-lite (maybe using __selected__)?

Any help is greatly appreciated!

5 REPLIES 5
lbendlin
Super User
Super User

Your "select"  action happens where?  In the Deneb visual or somewhere else?

Hello @lbendlin , the select action is performed in the Deneb visual, when clicking on the bars (I presented my example as a table to be more readable, but the Deneb visual is a bar chart).

Then you need to do the computation there too.

Ok I see, so it will necessarily be vega-lite code. I will ask for help on vega forums, but if anyone here have a tip, you're welcome.

Just for information, I also tried some vega-lite transforms, such as joinaggregate, but I didn't find any way to concatenate strings in its context.

For anyone having the same problem. I asked the question on stackoverflow, since the problem is more related to vega-lite/Deneb than to PowerBI itself. You can find it here (not answered at this time): powerbi - How to aggregate a text column? - Stack Overflow

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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