Powerpivot Calculation column

nd0911

Board Regular
Joined
Jan 1, 2014
Messages
166
Hello,

I have two tables in powerpivot and I need a calculation formula.

Im new with the PowerPivot world so please be gentle with me. :)


My data looks like that:

table1:
uniq order number | order price
1 | 500$
2 | 300$
3 | 100$
4 | 250&

table2:
order number | Time
3 | 1.5
3 | 2
1 | 5.2
2 | 2.33
1 | 4.5
4 | 1.22
3 | 1


I want to add a calculation column to table 2 that calculat the price for the relative record.
for example: the first record in table 2 sould return 22.2222

My calculation:
100/(1.5+2+1)*(Time column - first row)

* The "Time" column is the "time*24" (example: 02:30*24 = 2.5)


Thank you!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
You should not write a calculated column. Read my article here Calculated Columns vs Measures in DAX - Excelerator BI

Create a third table that contains all the unique order numbers. Join the 2 tables you have already to the new table. Create a pivot table and place the order number from the new table in the pivot on rows.

I can't understand the logic of your formula as written, but you can write a measure something like this

=sum(table2[time]) *max(table1[order price])
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top