averages from price change data

nileshp

New Member
Joined
Oct 29, 2008
Messages
19
The following table in PBI has price changes. I want to get a table of
a) monthly date-wise weighted average price. maybe i could create a table in PQ for each date in calendar and then group. But how do i do in DAX, since there are many materials.
b) simple average by material with considering first on month price and changes thereafter in the month
c) month end prices by material

[TABLE="width: 250"]
<colgroup><col><col span="2"></colgroup><tbody>[TR]
[TD="align: center"]Date[/TD]
[TD="align: center"]Material Name[/TD]
[TD="align: center"]Price[/TD]
[/TR]
[TR]
[TD="align: center"]01/01/2019[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]23[/TD]
[/TR]
[TR]
[TD="align: center"]01/01/2019[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]98[/TD]
[/TR]
[TR]
[TD="align: center"]23/01/2019[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]21[/TD]
[/TR]
[TR]
[TD="align: center"]23/01/2019[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]93[/TD]
[/TR]
[TR]
[TD="align: center"]01/02/2019[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]01/02/2019[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]90[/TD]
[/TR]
[TR]
[TD="align: center"]14/02/2019[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]22[/TD]
[/TR]
[TR]
[TD="align: center"]14/02/2019[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]89[/TD]
[/TR]
[TR]
[TD="align: center"]21/03/2019[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]25[/TD]
[/TR]
[TR]
[TD="align: center"]21/03/2019[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]86[/TD]
[/TR]
[TR]
[TD="align: center"]30/03/2019[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]30[/TD]
[/TR]
[TR]
[TD="align: center"]30/03/2019[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]11/05/2019[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]32[/TD]
[/TR]
[TR]
[TD="align: center"]11/05/2019[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]99[/TD]
[/TR]
[TR]
[TD="align: center"]12/05/2019[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]30[/TD]
[/TR]
[TR]
[TD="align: center"]12/05/2019[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]98[/TD]
[/TR]
</tbody>[/TABLE]


for example, wgtd avg derived by PQ
mmmAB
January22.4193548496.5483871
February21.0714285789.46428571
March23.3870967788.83870968
April30100
May30.0645161398.67741935

<thead>
</thead><tbody>
</tbody>




thanks
nilesh
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
In PowerPivot make new Column [Mont]:
Code:
=FORMAT([Date],"MMMM")

and create Pivot Table :
Rows:Month
Columns: Material Name
Value: Average for Price
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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