Forum Discussion

rphang's avatar
rphang
Frequent Visitor
5 years ago
Solved

CONCATENATE with Condition (To be used in Visuals)

Hi there,   Apologies first hand if there's a similar request within the forum.   I need some help & advice getting around presenting my data on a donut visual. Not sure by using Measures or addi...
  • Jos_Woolley's avatar
    5 years ago

    Ah, for a calculated column use:

    NewColumn = CONCATENATEX (
        DISTINCT (
            SELECTCOLUMNS (
                FILTER ( 'Table X', 'Table X'[Type B] = "Sales Product" && 'Table X'[Transaction No.]=EARLIER('Table X'[Transaction No.] )),
                "Type A", 'Table X'[Type A]
            )
        ),
        LOOKUPVALUE (
            'Type A Abbreviations'[Abbreviation],
            'Type A Abbreviations'[Type A], [Type A]
        ),
        " & "
    )

    Regards