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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
CarolLoveRabbit
New Member

How to link data from other table

Hi Team,

Need your help for this one. I have two tables as below.

 

Table 1: monthly units forecast. My painpoint is,

1. How can I get price from Table 2

2. How to calculate revenue once getting price

 

CarolLoveRabbit_0-1671101511053.png

Table 2: monthly unit price for products

CarolLoveRabbit_1-1671101529197.png

 

Thanks.

Br,

Carol Yan

 

1 ACCEPTED SOLUTION
Uspace87
Resolver III
Resolver III

@CarolLoveRabbit 

 

1) Load your 2 tables in power bi and "Unpivot" the date Columns in the "monthly unit price for products".

you should have a table like this:

 

Uspace87_1-1671102717074.png

 

2) Then you can Create a new Column mergin the "Product Number" and the "Date" in both tables

 

Uspace87_2-1671102795659.png

 

3) Then you can link the 2 tables with the new column you have just created 

 

Uspace87_3-1671102850460.png

 

4) Write the following measure for Revenue=

SUMX(
    'Units Forecast','Units Forecast'[Units]*RELATED(Prices[Value])
)

 

 

 

 

 

Uspace87_0-1671102632015.png

 

View solution in original post

2 REPLIES 2
Uspace87
Resolver III
Resolver III

@CarolLoveRabbit 

 

1) Load your 2 tables in power bi and "Unpivot" the date Columns in the "monthly unit price for products".

you should have a table like this:

 

Uspace87_1-1671102717074.png

 

2) Then you can Create a new Column mergin the "Product Number" and the "Date" in both tables

 

Uspace87_2-1671102795659.png

 

3) Then you can link the 2 tables with the new column you have just created 

 

Uspace87_3-1671102850460.png

 

4) Write the following measure for Revenue=

SUMX(
    'Units Forecast','Units Forecast'[Units]*RELATED(Prices[Value])
)

 

 

 

 

 

Uspace87_0-1671102632015.png

 

Solved. Thanks so much for your help😁

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.