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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jostnachs
Helper IV
Helper IV

Concatenating columns from different tables

I have 3 tables. policy(fact table),agreement(dimension table) and structure(dimension table). now i would like to have a concatenated column in my agreement table with columns coming from policy table and structure table dependening on a condition that i have in agreement table. I am not sure how i can use concatenate/concatenatex/relatetable functions for this requirement.below is the relationship i have between these three tables.

 

jostnachs_0-1722874324732.png

Below is what I would like to acheive.

jostnachs_2-1722874491493.png

 

Regards,

Jostna 

 

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @jostnachs - as per above relationships shared, 

Policy table is related to the Agreement table so you can  bring the required column to agreeement table. using related 
Agreement table is related to the Structure table.--> bring the strucutred colum nto agreement table.

 

create a new column in agreement table as below:

ConcatenatedColumn =
VAR PolicyNumber = RELATED(Policy[PolicyNumber])
VAR StructureName = RELATED(Structure[StructureName])
VAR AgreementType = Agreement[AgreementType]

RETURN
IF(
AgreementType = "Active", // your condition add it
PolicyNumber & " |" & StructureName,
BLANK()
)

 

Hope it works





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @jostnachs 

Is your problem solved, and if so, please mark the corresponding reply as a solution, which will help users with the same problem to better solve their problem.

 

 

 

 

 


Best Regards,

Jayleny

rajendraongole1
Super User
Super User

Hi @jostnachs - as per above relationships shared, 

Policy table is related to the Agreement table so you can  bring the required column to agreeement table. using related 
Agreement table is related to the Structure table.--> bring the strucutred colum nto agreement table.

 

create a new column in agreement table as below:

ConcatenatedColumn =
VAR PolicyNumber = RELATED(Policy[PolicyNumber])
VAR StructureName = RELATED(Structure[StructureName])
VAR AgreementType = Agreement[AgreementType]

RETURN
IF(
AgreementType = "Active", // your condition add it
PolicyNumber & " |" & StructureName,
BLANK()
)

 

Hope it works





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi @rajendraongole1 ,

 

Thank you so much for the help!

but i am having the following error.

jostnachs_0-1722883236890.png

 

i have all the fields and relation as mentioned above

tried it with the policy table alone but giving me the same relationship error.

its a m:n relation between policy and agreement, maybe there are records in the agreement-table without corresponding records in policy. you can try to make a table visual with the columns you want to have.

The RELATED function requires that a relationship exists between the current table and the table with related information. You specify the column that contains the data that you want, and the function follows an existing many-to-one relationship to fetch the value from the specified column in the related table. If a relationship does not exist, you must create a relationship.

Maybe a typo eg. is there really a space between Local Department?

its there 😀

i can say, that the solution with RELATED() works. (i have such a situation working). If you get an error message you have to check this message.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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