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
Fehrnovic
Frequent Visitor

Get value from another dataset with a corresponding column column

I don't know how to phrase this better but I have two datasets "Units" and "Tasks" containing different information. However, they share the columns "TaskName" and "TaskId".

 

The matrix i use displays information from "Units", including registered hours, for each "TaskName" in the dataset "Units". For each of these tasks in "Units", I want the corresponding field "BudgetHours" from the dataset "Tasks". How is this accomplished? I've tried making a bridge table with "TaskId" but it didn't work, and also I want the "TaskName" shown in the matrix, not the Id.

Here is what my matrix looks like:

spørgsmål.PNG

 

As you can see, it doesn't show the budget hours corresponding to the single task, but just the total of all tasks.

I would appreciate any help, thank you so much!

 

1 ACCEPTED SOLUTION

Hi @Fehrnovic,

 

Since you only want the "TaskName" shown in the matrix, not the Id, there is no need to add "ID" column into bridge table. You just need to establish relationship between bridge table and "Task" and "Units" table based on "TaskName" field.

 

But how is the bridge table created when I need both the unique "TaskName" and "TaskId" column in the same table?

Please refer to this formula:

Bridge table =
UNION (
    DISTINCT (
        SELECTCOLUMNS ( Units, "id", Units[ProjectID], "name", Units[ProjectName] )
    ),
    EXCEPT (
        DISTINCT (
            SELECTCOLUMNS ( Projects, "id", Projects[ID], "name", Projects[Name] )
        ),
        DISTINCT (
            SELECTCOLUMNS ( Units, "id", Units[ProjectID], "name", Units[ProjectName] )
        )
    )
)

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Fehrnovic,

 

You should create a bridge table with unique "TaskId" and "TaskName". Then, establish one to many relationship between bridge table and "Units" and "Tasks". Place "TaskName" from bridge table, "registered hours" from "Units" and "budget hours" from "Tasks" into Matrix.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey @v-yulgu-msft,

 

Thank you. This answer makes a lot of sense, but I can't seem to create the brigde table right. I have created multiple bridge tables for a single column using the following code:

 

ProjectName - Merged = DISTINCT(UNION(VALUES(Units[ProjectName]),VALUES(Projects[Name])))

But how is the bridge table created when I need both the unique "TaskName" and "TaskId" column in the same table?

 

Thank you very much in advance

Hi @Fehrnovic,

 

Since you only want the "TaskName" shown in the matrix, not the Id, there is no need to add "ID" column into bridge table. You just need to establish relationship between bridge table and "Task" and "Units" table based on "TaskName" field.

 

But how is the bridge table created when I need both the unique "TaskName" and "TaskId" column in the same table?

Please refer to this formula:

Bridge table =
UNION (
    DISTINCT (
        SELECTCOLUMNS ( Units, "id", Units[ProjectID], "name", Units[ProjectName] )
    ),
    EXCEPT (
        DISTINCT (
            SELECTCOLUMNS ( Projects, "id", Projects[ID], "name", Projects[Name] )
        ),
        DISTINCT (
            SELECTCOLUMNS ( Units, "id", Units[ProjectID], "name", Units[ProjectName] )
        )
    )
)

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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