Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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 dataset with multiple other columns.
Solved! Go to Solution.
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
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
@xsaldana , Convert unix time to datetime
power query -https://community.powerbi.com/t5/Desktop/Converting-UNIX-time-to-Date-in-PowerBI-for-Desktop/m-p/130...
Then in DAX have column
averageX(Filter(Table, Table[DateTime] <= earlier(Table[DateTime] ) && Table[DateTime] >= earlier(Table[DateTime] ) -time(0,0,3) ) ,[Value] )
@amitchandak
thank you for taking the time to look at this! Unfortunately, this did not work for me. The column processes for a while but doesn't load.
User | Count |
---|---|
48 | |
44 | |
19 | |
14 | |
14 |
User | Count |
---|---|
107 | |
57 | |
29 | |
20 | |
16 |