Forum Discussion
Anonymous
6 years agoNot applicable
Average time per status
Need a bit of help.. most likely something super-easy, but I just can't wrap my head around how to do this... As you can see from below I have a database that logs every time one of our projects ...
Greg_Deckler
Community Champion
6 years agoSee if amitchandak 's solution works. If not, please post sample data as text. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Anonymous
6 years agoNot applicable
Well... still don't get it to work... most likely just me that is overthinking it.
The data that I supplied earlier is as clean as it gets, but it is impossible for me to post all 2,8 million rows of data.
I have uploaded the file to my GoogleDrive, and you are welcome to download the pfix file and take a look: statuslog.pbix
Below is a screenshot of the rawdata.
- amitchandak6 years ago
Super User
Check. There was an error in the column name
last status = maxx(filter('statusLogs','statusLogs'[projectID]=EARLIER('statusLogs'[projectID]) && 'statusLogs'[status]<EARLIER('statusLogs'[status])),'statusLogs'[status]) Hour diff = datediff(maxx(FILTER('statusLogs','statusLogs'[projectID]=EARLIER('statusLogs'[projectID]) && ('statusLogs'[status])=EARLIER('statusLogs'[last status])),'statusLogs'[statusTime]),'statusLogs'[statusTime],HOUR)