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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sophtee
Frequent Visitor

Lookup column for filtered data

Hello everyone,

I have 2 tables in Power BI.

However when I created 2 reports (from the 2 separate tables), I would like to look up from a list of filtered data and fill in the other table:

sophtee_1-1708966131776.png

Age1 = LOOKUPVALUE('FHL-Tray Data'[Ageflk],'FHL-Tray Data'[Flk#],'podndatabasetable (2)'[Flock1])
Below shows the 2 tables which are both filtered tables. Is there a way to fix this column or can I create a flow to add this data to excel?
sophtee_2-1708966313726.png

 

 

 

2 ACCEPTED SOLUTIONS
barritown
Super User
Super User

Hi @sophtee,

This piece of code should help you:

barritown_0-1708976711944.png

In plain text:

Age1 = 
VAR currentFlock = [Flock1]
RETURN MAXX ( FILTER ( T2, [Flk#] = currentFlock ), [Ageflk] )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

View solution in original post

v-yaningy-msft
Community Support
Community Support

Hi, @sophtee 

 

Based on your description, I have created some measures to achieve the effect you are looking for. Following picture shows the effect of the display.

 

vyaningymsft_0-1709172370477.png

Measure:

 

Age1 =

LOOKUPVALUE ( Table2[Agefilk], Table2[Flk#], Table1[Flock1] )


Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

 

View solution in original post

2 REPLIES 2
v-yaningy-msft
Community Support
Community Support

Hi, @sophtee 

 

Based on your description, I have created some measures to achieve the effect you are looking for. Following picture shows the effect of the display.

 

vyaningymsft_0-1709172370477.png

Measure:

 

Age1 =

LOOKUPVALUE ( Table2[Agefilk], Table2[Flk#], Table1[Flock1] )


Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

 

barritown
Super User
Super User

Hi @sophtee,

This piece of code should help you:

barritown_0-1708976711944.png

In plain text:

Age1 = 
VAR currentFlock = [Flock1]
RETURN MAXX ( FILTER ( T2, [Flk#] = currentFlock ), [Ageflk] )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 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.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors