We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Hello,
Need some advice as I am new to PowerBI. I am trying to calculate the sum time from start time and end time. REfer to below.
DateTimeStart DateTimeEnd ToolName Operation User sumtime
31-Oct-16 9:00 31-Oct-16 17:00 HiSeq 2000 Engg TrainServ Bernard error
sumHours = sumx(timeTable, DATEDIFF(timeTable[DateTimeStart], timeTable[DateTimeEnd], SECOND))/3600
Please advice how to make it work.Thanks
Solved! Go to Solution.
Hi @wylee1,
You can create a measure like below:
TimeInter = DATEDIFF(SUM('Table2'[DateTimeStart]),SUM('Table2'[DateTimeEnd]),SECOND)
Or create a calculate column like this:
Inter = DATEDIFF('Table2'[DateTimeStart],'Table2'[DateTimeEnd],SECOND)
Reference:
DATEDIFF Function (DAX)
Best Regards,
Qiuyun Yu
Hi @wylee1,
You can create a measure like below:
TimeInter = DATEDIFF(SUM('Table2'[DateTimeStart]),SUM('Table2'[DateTimeEnd]),SECOND)
Or create a calculate column like this:
Inter = DATEDIFF('Table2'[DateTimeStart],'Table2'[DateTimeEnd],SECOND)
Reference:
DATEDIFF Function (DAX)
Best Regards,
Qiuyun Yu
You can try this measure to get the correct results:
TotalHrs:=SUMX(timeTable,([DatetimeEnd]-timeTable[DatetimeStart])*1440/60)
User | Count |
---|---|
67 | |
61 | |
47 | |
35 | |
32 |
User | Count |
---|---|
87 | |
72 | |
57 | |
51 | |
45 |