Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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 $ $)?
Solved! Go to Solution.
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])
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])