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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Hayk
Frequent Visitor

Fix reference ($ excel)

Hello;

 

I have two (received cost of goods, sold cost of goods) columns of data which are in different files and are indexed by the same (identification number) column  (there is a created relationship between identification number columns).  I want to create a measure to calculate the percentage of sold goods (sold goods/received goods) by the date. How can I do that? I mean how to fix the <received cost of goods> column (like we do in excel by using $ $)?  

1 ACCEPTED SOLUTION
Anonymous
Not applicable

So as far as I can tell your problem is as follows you have the two following tables

 

Table 1

ID,Received Cost

1,5

2,10

3,15

 

Table 2

ID,Sold Cost

1,10

2,20

3,30

 

And you have a (I assume a one to one) relationship between the two tables.

 

Now as to your question, if you want to refer to a column in a measure/cal column you just use the column name. The key difference between excel and dax in this case is that DAX references columns whereas excel you can reference cells. So if you wanted to divide sold cost by recieved cost you would use the following measure

 

Measure = SUM(Table2[Sold Cost])/SUM(Table1[Received Cost])

View solution in original post

1 REPLY 1
Anonymous
Not applicable

So as far as I can tell your problem is as follows you have the two following tables

 

Table 1

ID,Received Cost

1,5

2,10

3,15

 

Table 2

ID,Sold Cost

1,10

2,20

3,30

 

And you have a (I assume a one to one) relationship between the two tables.

 

Now as to your question, if you want to refer to a column in a measure/cal column you just use the column name. The key difference between excel and dax in this case is that DAX references columns whereas excel you can reference cells. So if you wanted to divide sold cost by recieved cost you would use the following measure

 

Measure = SUM(Table2[Sold Cost])/SUM(Table1[Received Cost])

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.