Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |