cancel
Showing results for 
Search instead for 
Did you mean: 

Activity Duration as a % of Total Time

liamcameron
9 - Travel Pro
9 - Travel Pro

I have a dataset with 3 columns:

 

ActivityType StartDate  EndDate


I’m attempting to build a visual that will report on what % of time is spent on which activity vs another, but I need to consider that not as a percent of all activities, but of all the possible time (assume there will be a time filter). My users want to report on how much of the day had nothing recorded

so I may be wrong, but I created a custom table of every day since 2023:

liamcameron_0-1715876484616.png

 



liamcameron_1-1715876484616.png

 

 

Then I tried to build a visual, that does a Timespent/TotalTime calculation… to do this I did Sum(Mndiff (enddate, startdate)) / Sum(minddiff (maxdate, minddate))

but I get this error:

liamcameron_2-1715876484616.png

Then i've tried using the timestamp... but sitll get this:

liamcameron_0-1715879422542.png

 

 

liamcameron_3-1715876484617.png

 

 

3 REPLIES 3

gwolfe
10 - ETL
10 - ETL

@liamcameron take a look at this Excel screen shot. In the example there is 1 record for green. The difference between the start and end date is 3. Then on your new date table you created (which is filterable by the user) the difference between the selection is 10 days. My understanding is that you want to show 3 / 10 = 30% of the selected time spent on green. Is that correct? 

DRay
Community Team Leader
Community Team Leader

Hello @liamcameron,

I wanted to follow up to see if the solution offered by @gwolfe worked for you.

If so, please click the 'Accept as Solution' button so other users with the same questions can find the answer faster. If not, please let us know so that we can continue to help.

Thank you.

David Raynor (DRay)

DRay
Community Team Leader
Community Team Leader

Hello @liamcameron,

I wanted to follow up to see if the solution offered by @gwolfe worked for you.

If so, please click the 'Accept as Solution' button so other users with the same questions can find the answer faster. If not, please let us know so that we can continue to help.

Thank you.

David Raynor (DRay)