Forum Discussion
ChristyQV
5 years agoFrequent Visitor
Calculated table or column with a rolling average
Dear GURUS! Please help! I have a data set like below, with the result I'm working towards: Date WellCode RunHours Desired column- 3 Day Running Avg Criteria Result 4/29/2021 BN_WP0...
- Anonymous5 years ago
Hi ChristyQV ,
Try using this formula to calculate the average value.
Column = CALCULATE(AVERAGE('FactPumpageDaily'[RunHours]),FILTER(ALLEXCEPT('FactPumpageDaily','FactPumpageDaily'[WellCode]),'FactPumpageDaily'[Date]>EARLIER('FactPumpageDaily'[Date])-3&&'FactPumpageDaily'[Date]<=EARLIER('FactPumpageDaily'[Date])))Best Regards,
Jay
Ashish_Mathur
5 years agoSuper User
Hi,
If you wish to "igure out how many times it is greater than a specified value", you can do so with a measure. As requested in my previous message, share some data, describe the question and show th expected result.
ChristyQV
5 years agoFrequent Visitor
I have a sample data with the result that I am trying to get to at the very beginning of the original question. I apologize, but I do not understand what other data and expected result you require. I have decided to have SQL Server do this calculation in a view and use this view in PBI so I will not waste anymore of your time.