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
cassels
Advocate I
Advocate I

Bring the same column with conditions

Hi! I'm new on Power BI, so I apologize in advance if my question is stupid, but I've been looking here at this forum, and I couldn't find a solution

 

I have 3 tables. One table of devices, one of owners, and a third one that connects both called Device_Owner(DeviceID, OwnerID and OwnerSeq).


One device has first and second owner. That is defined on the database by the table Device_Owner, column OwnerSeq. If the OwnerSeq = 1, then is the first.

 

Now I need to bring that in table with columns like DeviceName, FirstOwner and SecondOwner.

(I tried to create a new table with DeviceID, Owner, and OwnerSeq, but I couldn't.)

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

1) If you want this in a New Table (not a Table Visual)

click New Table on the Modeling Tab and type this

Summary Table =
SUMMARIZECOLUMNS (
    Devices[DeviceName],
    "First Owner", CALCULATE (
        FIRSTNONBLANK ( Owners[OwnerName], 1 ),
        FILTER ( Device_Owner, Device_Owner[OwnerSeq] = 1 )
    ),
    "Second Owner", CALCULATE (
        FIRSTNONBLANK ( Owners[OwnerName], 1 ),
        FILTER ( Device_Owner, Device_Owner[OwnerSeq] = 2 )
    )
)

First Owner and Second Owner.png

2) You can also achieve this without creating a New Table by creating these 2 Measures instead

First Owner =
CALCULATE (
    FIRSTNONBLANK ( Owners[OwnerName], 1 ),
    FILTER ( Device_Owner, Device_Owner[OwnerSeq] = 1 )
)

and

Second Owner =
CALCULATE (
    FIRSTNONBLANK ( Owners[OwnerName], 1 ),
    FILTER ( Device_Owner, Device_Owner[OwnerSeq] = 2 )
)

then click the Table Visual icon in the Visualizations area

add the DeviceName from the Devices Table and the 2 Measures

First Owner and Second Owner2.png

Hope this helps! Smiley Happy

View solution in original post

2 REPLIES 2
Sean
Community Champion
Community Champion

1) If you want this in a New Table (not a Table Visual)

click New Table on the Modeling Tab and type this

Summary Table =
SUMMARIZECOLUMNS (
    Devices[DeviceName],
    "First Owner", CALCULATE (
        FIRSTNONBLANK ( Owners[OwnerName], 1 ),
        FILTER ( Device_Owner, Device_Owner[OwnerSeq] = 1 )
    ),
    "Second Owner", CALCULATE (
        FIRSTNONBLANK ( Owners[OwnerName], 1 ),
        FILTER ( Device_Owner, Device_Owner[OwnerSeq] = 2 )
    )
)

First Owner and Second Owner.png

2) You can also achieve this without creating a New Table by creating these 2 Measures instead

First Owner =
CALCULATE (
    FIRSTNONBLANK ( Owners[OwnerName], 1 ),
    FILTER ( Device_Owner, Device_Owner[OwnerSeq] = 1 )
)

and

Second Owner =
CALCULATE (
    FIRSTNONBLANK ( Owners[OwnerName], 1 ),
    FILTER ( Device_Owner, Device_Owner[OwnerSeq] = 2 )
)

then click the Table Visual icon in the Visualizations area

add the DeviceName from the Devices Table and the 2 Measures

First Owner and Second Owner2.png

Hope this helps! Smiley Happy

I can not thank you enough!

You helped me sooooooooooo much.

I really, really appreciate your time and attention.

You save my week.

Smiley Very Happy

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.

Top Solution Authors
Top Kudoed Authors