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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Look for rows in another table from a dax filtered value

Hi, 

 

I would like to create a identity card of a machine. This machine has values in different tables. 

To display the machine name, i use the following DAX : 

Machine name = IF (HASONEVALUE (Table1[Machinename]),SELECTEDVALUE (Table1[MachineName]),"")
I would like to display all the related values of this machine, it works well if these values are in the same table. 
How could I look for the certain related in another table? 
 
Thank you in advance for your help.
 
Tg 
1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Something like:

Details Selected Machine Name =
VAR SelectedMachineName = [Machine name]
RETURN
    CALCULATE(
        MIN( Table2[SECTION] ),
        FILTER( Table1, Table1[Machine name] = SelectedMachineName )
    )

Regards

View solution in original post

4 REPLIES 4
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Something like:

Details Selected Machine Name =
VAR SelectedMachineName = [Machine name]
RETURN
    CALCULATE(
        MIN( Table2[SECTION] ),
        FILTER( Table1, Table1[Machine name] = SelectedMachineName )
    )

Regards

Anonymous
Not applicable

Thank you for your replies. Here I add more information

Table1

NAMEGROUP
NAME1GROUP A
NAME2GROUP A
NAME3GROUP A
NAME4GROUP B
NAME5GROUP B
NAME6GROUP B
NAME7GROUP C
NAME8GROUP C
NAME9GROUP C
NAME10GROUP C
NAME11GROUP C
NAME12GROUP C
NAME13GROUP D 
NAME14GROUP F
NAME15

GROUP F

 

Table2

 

SECTIONSUB SECTION GROUP
SECTION 1SUB SECTION 11GROUP A
SECTION 1SUB SECTION 12GROUP B
SECTION 1SUB SECTION 13GROUP C
SECTION 1SUB SECTION 14GROUP D
SECTION 2SUB SECTION 21GROUP E
SECTION 2SUB SECTION 22GROUP F
SECTION 3SUB SECTION 31GROUP H
SECTION 3SUB SECTION 32GROUP I
SECTION 3SUB SECTION 33GROUP J
SECTION 3SUB SECTION 34GROUP K

 

vnqt_0-1665262319823.png

 

vnqt_1-1665262437152.png

I would like to display the section and sub section of the selected machine name.

 

Thank you in advance for your help.

Tg 

 

 

AilleryO
Memorable Member
Memorable Member

Hi,

We need more information to help you, but at least I can give you some hints that might help.

If both table are linked in Model view you can use RELATED function to get the value from the other table (going from many to one in the relation).

Otherwise you have LOOKUPVALUE function, or merging with Power Query...

In fact many options but depends on your situation.

Let us know

Shaurya
Memorable Member
Memorable Member

Hi @Anonymous,

 

You can lookup values in another table by using the LOOKUP function.

 

Please refer to:

 

https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax

 

Mark this post as a solution if that works for you!

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.