Forum Discussion

Alex_RM's avatar
Alex_RM
Icon for Advocate I rankAdvocate I
1 year ago

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

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

    • Alex_RM's avatar
      Alex_RM
      Icon for Advocate I rankAdvocate I

      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).

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        Then you need to do the computation there too.