Forum Discussion

Adam1V's avatar
Adam1V
Frequent Visitor
6 years ago
Solved

Calculating Values between two columns

Hi All,

Im very new to Power BI so may need some help explained in simple terms.

 

Within my data source I have  <1000 rows of timesheet entries. For the most part, these are split into two columns, ‘Start Date Time” and “Finish Date Time”.

Im looking to sum these up and display the accumulated hours within the dashboard and wondered whats the best way to go about this.

 

I was thinking of creating a custom column in the power query editor to derive the time spent for each timesheet entry. Does this sound like a reasonable approach?

 

Thanks in advance.

  • Hi Adam1V , 

    I am not  clear about your requirement, if you want to calculate datediff between start time and end time, you could try to use below M code to see whetehr it work ot not

    Duration.Hours(Duration.From([End time]-[Start time])))

     In  addition, if possible could you please inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies