Can you help me please

"Hello, (sorry for my english which is not very good)

I would like to know how to add the time spent on each site per day. I record my times on a googlsheet using a mobile application (Tasker).

My data is saved like this:

-Site A: โ€œโ€œtimestartโ€โ€ โ€”> โ€œโ€œTimestopโ€โ€ ----> โ€œโ€œTotal durationโ€โ€

-Site B: โ€œโ€œtimestartโ€โ€ โ€”> โ€œโ€œTimestopโ€โ€ ----> โ€œโ€œTotal durationโ€โ€

-Site A: โ€œโ€œtimestartโ€โ€ โ€”> โ€œโ€œTimestopโ€โ€ ----> โ€œTotal durationโ€

-Site B: โ€œโ€œtimestartโ€โ€ โ€”> โ€œโ€œTimestopโ€โ€ ----> โ€œTotal durationโ€

I would like to know how to have a duration of site A and a duration of site B."

Thanks

0 4 192
4 REPLIES 4

@Anthony21
You can create a Virtual Column with an expression like this:

SUM(
    SELECT(
        TableName[Total Duration],
        [SiteName] = [_Thisrow].[SiteName] // Change the column name for [SiteName] as per your schema
    )
)

@LeventK
Awesome !!
Thank you very much for your help, this is exactly what I was looking for

Youโ€™re welcome

@LeventK
Sorry but I still have a problem that I cannot solve.

If I use my example

-Site A: โ€œโ€œ timestart โ€โ€ -> โ€œโ€œ Timestop โ€โ€ ----> โ€œโ€œ Total duration โ€โ€

-Site B: โ€œโ€œ timestart โ€โ€ -> โ€œโ€œ Timestop โ€โ€ ----> โ€œโ€œ Total duration โ€โ€

-Site A: โ€œโ€œ timestart โ€โ€ -> โ€œโ€œ Timestop โ€โ€ ----> โ€œTotal durationโ€

-Site B: โ€œโ€œ timestart โ€โ€ -> โ€œโ€œ Timestop โ€โ€ ----> โ€œTotal durationโ€

In my application after using the expression it looks like this:

Site A
Day 1: Total duration
Day 2: Total duration

Site B
Day 1: Total duration
Day 2: Total duration

But I would like it to appear like this:

Site A: Total duration
Site B: Total duration

Thanks

Top Labels in this Space