Forum Discussion
xsaldana
4 years agoRegular Visitor
Moving Average every three seconds
Hello! I am attempting to find the moving average for every three seconds in unix time. Any suggestions? Here is an example of values I have to work with. Additionally, I am working with a large data...
- Anonymous4 years ago
Hi xsaldana ,
Convert the unix time to datetime.
https://whatthefact.bi/power-bi/dax/convert-unix-timestamp-to-date-or-datetime-format-in-power-bi/
Column = #datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [unix time])
Then create a calculated column with below dax formula:
Column = CALCULATE(AVERAGE('Table'[value]),FILTER('Table','Table'[datetime]>EARLIER('Table'[datetime])-3/86400&&'Table'[datetime]<=EARLIER('Table'[datetime])))Best Regards,
Jay
Anonymous
4 years agoNot applicable
Hi xsaldana ,
Convert the unix time to datetime.
https://whatthefact.bi/power-bi/dax/convert-unix-timestamp-to-date-or-datetime-format-in-power-bi/
Column = #datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [unix time])
Then create a calculated column with below dax formula:
Column = CALCULATE(AVERAGE('Table'[value]),FILTER('Table','Table'[datetime]>EARLIER('Table'[datetime])-3/86400&&'Table'[datetime]<=EARLIER('Table'[datetime])))
Best Regards,
Jay