Forum Discussion
tjn_1992
4 years agoFrequent Visitor
Calculating time spent in sub status
Hi all, I have a table called "Sub Status" which has three columns: ID, Date_Time, and Sub Status. I would like to create a column in this table which calculates how much time in hours an ID...
- Anonymous4 years ago
Hi tjn_1992 ,
Please create an index column.
index = int(RIGHT('Sub Status'[Sub Status],1))Then create the a column like below:
hours = var next_time = CALCULATE(MIN('Sub Status'[Date_Time]),FILTER('Sub Status','Sub Status'[ID]=EARLIER('Sub Status'[ID])&&'Sub Status'[Date_Time]>EARLIER('Sub Status'[Date_Time]))) return DATEDIFF('Sub Status'[Date_Time],next_time,MINUTE)/60Best Regards,
Jay
NidhiBhusari
Helper IV
4 years agoHi tjn_1992 ,
Can you please give me access to the .pbix file?
tjn_1992
4 years agoFrequent Visitor
Hi Nidhi,
You should have access to the PBIX now. Here is the link again: Link to PBIX
Kind regards,
TJ