Is there a way to capture a time period (in days) from date filter?

I have a spreadsheet of downtime events for multiple pieces of equipment (units). The data includes a unique identifier for each unit, the reason it went down, the date and time it went down, and the date and time the downtime ended (among other less important information). Our customers are intersted in seeing the percentage that each unit is running. We do this by summing the downtime events by unit, subtracting the total downtime from the number of hours over a given time period and then divide by the same number of hours. Typically this is done over one month periods, so when we do these reports in Excel, we just hardcode the number of hours based on their being 30 or 31 days in the month. 

I would like our customers to be able to use the date filter in Spotfire to look at a specific period of time and as they change the date filters have not only the downtime events that show up change but also have the total available hours used in the calculation change. Does anyone know of a fairly straightforward way to do this? The only way I've been able to do it thus far is to set up a property control with an input field for the start and end date and using dateDiff in my calculations, but this does not change the filter--so if the user wants to look at a new time period, he has to change both the property controls AND the date filter. Thanks in advance!

(1) Answer

Login