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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Pastrupgaard
Helper I
Helper I

Problem with if formula between two different tables

Hi,

 

I'm trying to make a connection between two different tables and I'm having trouble figuring out how to do it the best way. I have the following two tables:

     - d_product

     - f_sales

 

In both tables i have a unique field called [Item_no_key]. What i'm trying to do is: If d_product[item_no_key] = f_sales[item_no_key] then write f_sales[actual ($)] in a new column in d_product. 

I would appreciate any and all advice 🙂


Br
Pastrupgaard

3 REPLIES 3
jthomson
Solution Sage
Solution Sage

I'm not entirely sure why you'd need to pull it from one table to another given the relationship you have, but the RELATED function should be able to do this?

Hi @jthomson

 

I just saw that the d_product[item_no_key] is unique in this table, and f_sales[item_no_key] is not, doesn't that make any difference? Can you give an an example of how the RELATED function works? 

Br
Pastrupgaard

Hi @Pastrupgaard,

Create a relationship between d_product[item_no_key] and f_sales[item_no_key](one-to-many) relationship. "What i'm trying to do is: If d_product[item_no_key] = f_sales[item_no_key] then write f_sales[actual ($)] in a new column in d_product." For one row in d_product table, there are mutiple f_sales[actual ($)] in f_sales table, how calculate? Please use a aggregate function, like SUM, MAX, MIN and so on.

Best Regards,
Angelia

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.