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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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