Forum Discussion
Bharani
7 years agoRegular Visitor
Find time duration between 2 dates (Datetime format)
Hi Experts - Am new to Power BI.. Hope u can crack my query in a min... I need to calculate "Number of minutes" between 2 dates which is in Datetime format..Below date is an example.. 3/11/20...
Johanno
7 years agoContinued Contributor
Hi, an ugly solution could be as a measure where I called my table CountMinutes:
CountMinutes = SUMX(CountMinutes;
YEAR(CountMinutes[accepttime])*1440*365+MONTH(CountMinutes[accepttime])*1440*30+DAY(CountMinutes[accepttime])*1440+HOUR(CountMinutes[accepttime])*60+MINUTE(CountMinutes[accepttime])
-YEAR(CountMinutes[logtime])*1440*365-MONTH(CountMinutes[logtime])*1440*30-DAY(CountMinutes[logtime])*1440-HOUR(CountMinutes[logtime])*60-MINUTE(CountMinutes[logtime]))
Someone will probably give us a more sophisticated solution. :smileyvery-happy: