Forum Discussion
Data Smoothing (moving average in matrix)
- 7 years ago
Matt_P i think this will do it, i just used -2 +2 for columns but not rows, in this updated file now it is for both. see attached. sorry for the delay :)
Matt_P I might be missing something in the calculation, solution is attached you can tweak as per your need.
parry2k Thanks very much for your help!!
Its close, but looking at the numbers the formulae is only taking 1 row and I would like it to take 'the' row, 2 rows above and 2 rows below.
Any assistance with this would be greatly appreciated!
- Matt_P7 years agoHelper I
https://1drv.ms/x/s!AsRFZB1O95IYf_29aQ99322rCLM
Link to above spreadsheet.
Hi parry2k , the power BI gives an answer of 123 when the target is 600. i.e. just the yellow highlighted cells. I would like the whole box of values totaled and divided by 25. eg If i want to calculate the cell in the averages matrix that is for 55,3000 then the boxed values contained within the area given by +2 & -2 rows plus +2 & -2 columns are taken from the data, added and divided by 25. (result is 14995/25 = 599.8 (600))
Again thanks for your help!
- Matt_P7 years agoHelper I
parry2k thanks!!!
Here is a link to the spreadsheet. https://1drv.ms/x/s!AsRFZB1O95IYgQBlPwy1W79z07wL
Ive not completed all the data however, the 2nd matrix is what im after for the whole dataset.
Again many thanks - learning such alot!!
- Matt_P7 years agoHelper I
Ok, so i've got as far as getting one of the cells calculated using a command to generate a new table.
AB = CALCULATETABLE(FlatData,FlatData[ConcSpan]>=900,FlatData[ConcSpan]<=1500,FlatData[Load (bins)]>=0,FlatData[Load (bins)]<=20). The total of the table Qty is the answer for this cellBut how would do I get this to iterate over the entire dataset to produce a table of data:ConcSpan | Load | SmoothingAverageAny help appreciated.Link to PowerBI: https://1drv.ms/u/s!AsRFZB1O95IYgQFiElJrevnRIAjJlink to data: https://1drv.ms/u/s!AsRFZB1O95IYgQFiElJrevnRIAjJ - parry2k7 years agoSuper UserHey sorry I totally missed it. I know this is due, will surely get this to you as soon as I am in front of computer
- Matt_P7 years agoHelper I
parry2k Hey
Here is a link to the spreadsheet: https://1drv.ms/x/s!AsRFZB1O95IYgQNly1A0H1m-SGjQ
Again thanks for your help!!
- Matt_P7 years agoHelper I
Thats it - genius - absolutley fantastic - thankyou!!!
On to stage 2...
I need to do some more work to the excel to explain what im after, and I will try to repicate it in PowerBI myself first... dont hold much hope of that given past experiance. I Just hope your still about to assist... :smileyhappy::smileyhappy:
- Anonymous7 years agoNot applicable