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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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:
Key | Value to concatenate | Concatenation |
a | valueA | valueA, valueB, valueC |
b | valueB | valueA, valueB, valueC |
c | valueC | valueA, valueB, valueC |
Here is the expected result when I select some of the rows (here in bold):
Key | Value to concatenate | Concatenation |
a | valueA | valueA, valueC |
b | valueB | valueA, valueC |
c | valueC | valueA, 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!
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