Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
thhmez7
Helper III
Helper III

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.

thhmez7_0-1656927042310.png

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:

thhmez7_1-1656927136232.png

thhmez7_2-1656927151966.png

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

Thank you.

 

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

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

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

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

Thank you, it works.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.