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
<thead>
</thead><tbody>
</tbody>
thanks
nilesh
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
mmm | A | B |
---|---|---|
January | 22.41935484 | 96.5483871 |
February | 21.07142857 | 89.46428571 |
March | 23.38709677 | 88.83870968 |
April | 30 | 100 |
May | 30.06451613 | 98.67741935 |
<thead>
</thead><tbody>
</tbody>
thanks
nilesh