Forum Discussion

thhmez7's avatar
thhmez7
Icon for Helper III rankHelper III
4 years ago
Solved

DAX Measure: Filter in concatenatex

Hi,

I'd like to filter the concatenated column value in the DAX statement with CONCATENATEX, in this example:

Only Assignments with Relevant = Y should be shown for each account.

So in the end, the measure should only show Task A for Acc A, blank for B and Task D for C.

So far my measure works without the filter:

How can I now add the filter part in this measure?

Thank you.

 

 

  • Hi thhmez7 
    Please try 

    Assignment Measure =
    VAR FilteredTable =
        FILTER ( Assignm, Assignm[Relevant] = "Y" )
    VAR Result =
        CONCATENATEX (
            FilteredTable,
            Assignm[Assignment],
            ";" & UNICHAR ( 10 ),
            Assignm[Assignment], ASC
        )
    RETURN
        Result

2 Replies

  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    Hi thhmez7 
    Please try 

    Assignment Measure =
    VAR FilteredTable =
        FILTER ( Assignm, Assignm[Relevant] = "Y" )
    VAR Result =
        CONCATENATEX (
            FilteredTable,
            Assignm[Assignment],
            ";" & UNICHAR ( 10 ),
            Assignm[Assignment], ASC
        )
    RETURN
        Result