Rhea
Rhea

Reputation: 53

TEXTJOIN (IF statement - Array) in Power BI

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.

Upvotes: 0

Views: 661

Answers (1)

Jos Woolley
Jos Woolley

Reputation: 9062

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],
        "/"
    )

Upvotes: 2

Related Questions