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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
rajkiran_tadaka
Frequent Visitor

Create custom column from other tables

Hi All,

 

I have a requirement to create custom column rom different tables.

 

Below is the scenario.

 

if ('Region_Table'[RGN_CODE]='APAC' and 'Products_Table'[Product Line] = 'RD79') then ('ABC')
else if ('Region_Table'[RGN_CODE]='EMEA' and 'Products'[Product Line] in ('RD79','RD80')) then ('EFG')
else ('XYZ')

 

Thanks in Advace.

3 REPLIES 3
v-cherch-msft
Employee
Employee

Hi @rajkiran_tadaka 

 

You may create a calculated column in Region_Table as below.Please make sure the two tables are linked as One to One or One(Products_Table) to More(Region_Table) in relationship view.

Column =
IF (
    Region_Table[RGN_CODE] = "APAC"
        && RELATED ( Products_Table[Product Line] ) = "RD79",
    "ABC",
    IF (
        Region_Table[RGN_CODE] = "EMEA"
            && RELATED ( Products_Table[Product Line] ) IN { "RD79", "RD80" },
        "EFG"
    )
)

Regards,

Cherie

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

Hi @v-cherch-msft ,

 

Thank you for your reply,

 

Actually these two dimension tables don't have direct relationship. These two dimensions are joined to FACT_SALES table.

Can you plesae advice.

 

Thanks,

RajKiran

Hi @rajkiran_tadaka 

 

You may use LOOKUPVALUE function.If you need further help,please share some data sample. You can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Regards,

Cherie

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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