Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel


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.

>Solution :

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

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading