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
olimilo
Continued Contributor
Continued Contributor

Concatenate all LOOKUPVALUE matches using a calculated column?

We have the following datasets: Table1 would contain all the data regardless of RESULT while Table2 will contain all the failures:

 

Table1
  
ID RESULT
1 FAIL
2 PASS
3 FAIL
4 PASS
5 PASS

 

Table 2  
ID CRITERIA
1 Color
1 Size
3 Size
3 Packaging
3 Adhesive

 

Would it be possible to concatenate all CRITERIA values from Table2 with matching IDs from Table1 as a calculated column? I understand this can be done via query but preferably we'd like to do this via DAX to reduce query refresh duration.

 

Desired output    
ID RESULT FAILED_CRITERIA
1 FAIL Color, Size
2 PASS  
3 FAIL Size, Packaging, Adhesive
4 PASS  
5 PASS  
1 ACCEPTED SOLUTION
olimilo
Continued Contributor
Continued Contributor

Was able to find a solution through here: https://community.fabric.microsoft.com/t5/Desktop/Concatenatex-Lookupvalue-multiple-values/m-p/73929...

 

In my case, the tables are not related to this works:

 

FAILED_CRITERIA =
CONCATENATEX (
    CALCULATETABLE (
        VALUES ( Table2[CRITERIA] ),
        Table2[ID] = EARLIER ( Table1[ID] )
    ),
    Table2[CRITERIA],
    ", "
)

View solution in original post

1 REPLY 1
olimilo
Continued Contributor
Continued Contributor

Was able to find a solution through here: https://community.fabric.microsoft.com/t5/Desktop/Concatenatex-Lookupvalue-multiple-values/m-p/73929...

 

In my case, the tables are not related to this works:

 

FAILED_CRITERIA =
CONCATENATEX (
    CALCULATETABLE (
        VALUES ( Table2[CRITERIA] ),
        Table2[ID] = EARLIER ( Table1[ID] )
    ),
    Table2[CRITERIA],
    ", "
)

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.