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, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
eniX
Helper III
Helper III

Perform one-to-many lookup with measure

Hi folks,

 

is it possible to perform a one-to-many lookup with measure, not calculated column? When I work with calculated columns and tables it's so intuitive, but with measures I just miss the row context...

 

simple example:

 

lookup1.pnglookup2.png

 

I have two tables with one-to-many relationship. Now I want to create a table visual and display id with values for choosen category.

 

I can't use LOOKUPVALUE properly because I can't say object.id = lookup.object_id.

 

Any ideas?

1 ACCEPTED SOLUTION

HI @eniX

 

In that case

 

Measure =
VAR Myresult =
    CONCATENATEX ( LookUp, LookUp[value], ", " )
RETURN
    IF ( ISBLANK ( Myresult ), "", myresult )

Regards
Zubair

Please try my custom visuals

View solution in original post

6 REPLIES 6
Zubair_Muhammad
Community Champion
Community Champion

@eniX

 

How are you man?

What are your expected results?

 

Try this MEASURE

 

Measure =
CONCATENATEX ( LookUp, LookUp[value], ", " )

Regards
Zubair

Please try my custom visuals

@eniX

 

Lookup(manytoOne).png

 

 


Regards
Zubair

Please try my custom visuals

trying to get used to DAX 🙂

 

your measure is nearly what I try to achieve, but I need a left join there instead of inner join. By this  I mean I need a full list of objects(id) no matter, if the measure is empty or not.  so in your example i also need to see ids 3,5 and 6 with an empty mesure each.

HI @eniX

 

In that case

 

Measure =
VAR Myresult =
    CONCATENATEX ( LookUp, LookUp[value], ", " )
RETURN
    IF ( ISBLANK ( Myresult ), "", myresult )

Regards
Zubair

Please try my custom visuals

@eniX

 

Lookup(many to One).png


Regards
Zubair

Please try my custom visuals

Perfect, thank you again 🙂

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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