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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
redagad13
Regular Visitor

Looking up the value in related table based on the first/last aggregation

Hello,

 

I have one table containing a document name and the elements contained in the document:

Document    ObjectName
Document 1  Task A

Document 1  Task B

Document 2  Task A

Document 3  Task A

Document 3  Task  C

 

I have another table containing a unique list of elements (ObjectName)

Object

Task A

Task B

Task C

 

Both tables are related using the unique identifier column of elements.

 

The first table is filtered by the user using a slicer to select 2 document names: For example, when selecting Document 1 and 3, I I want to display the unique list of elements and create an additional column (Source) that will indicate if the element is present in the first selected document, the second (last selected document or both).

Desired Result (when selecting Document 1 and 3 from the slicer):

Object  Source
Task A   Document 1 and 3

Task B Document 1

Task C   Document 3

 

Any help would be greatly appreciated!

 

Thanks!

 

4 REPLIES 4
redagad13
Regular Visitor

Oh, this is great! Thanks very much @lbendlin 

lbendlin
Super User
Super User

Please explain the reason for not showing Task B in the result - it is linked to one of the documents.

Thanks for you reply. It should be returned, that was a mistake from my side. I amended the original post.

lbendlin_0-1647208802679.png

This logic should work for any number of documents and will show the correct spelling (for varying degrees of correct).  See attached.

 

Apologies for the DOM joke.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.