Home > Mobile >  TEXTJOIN (IF statement - Array) in Power BI
TEXTJOIN (IF statement - Array) in Power BI

Time:10-19

I have a data for which I used TEXTJOIN in excel to achieve the result.


The function looks like :

=TEXTJOIN("/", TRUE, IF([id]=[@[id]], [likes], ""))


How can I achieve this in Power BI?

In Excel, I converted my data to Table and then hit CTRL SHIFT ENTER (as it's array) to get my results.

CodePudding user response:

You could add a Calculated Column to your table with the following formula:

=
VAR ThisID = 'Table'[id]
RETURN
    CONCATENATEX(
        FILTER(
            'Table',
            'Table'[id] = ThisID
        ),
        'Table'[likes],
        "/"
    )
  • Related