Just starting out here with powerpivot, and I need to do something that seems a bit tricky to me.
I'm setting up a data model to report on performance of a fleet of power generators. One of my main data tables, I'll call it ProductionStop, records 'outage' events, so a typical record will identify the specific equipment by serial number [unitSN], it will include two dates, the first being the date and time the unit went off line, call it [dateOffline], the second date records when the unit returned to service, lets call it [dateOnline]. These dates are in format mm/dd/yyyy hh:mm:ss AM/PM. I also have a date lookup table currently formatted as mm/dd/yyyy.
I need a measure that will totalize the durations (hours) of all outages that have occurred within a specified time frame for any specific [unitSN].
The measure, lets call it [duration], needs to count all the hours for outage events whose start and stop times fall fully within a user selected Report time frame,
...but for the outages that have either commenced prior to beginning of the Report time frame as well as those who have continued on past the end of the Report time frame, the measure should only count the down hours that actually fell within the requested Report time frame.
for example, say 'engine1' has two outage events as follows:
unitSN --------- dateOffline ----------------------- dateOnline
engine1 ------- 12/10/2015 12:00:00 AM -------- 1/10/2016 12:00:00 AM
engine1 ------- 1/20/2016 12:00:00 AM --------- 1/21/2016 12:00:00 AM
Now, while the total duration of the two outages is the sum of the duration of both events, 768 hours, lets say my user picks pivot slicers for the period of 1/1/2016 to 1/31/2016 to report on. The total duration of outage hours should then be calculated as 240 hours since the first 20 days of the first outage don't fall within the reporting period.
Hope this makes some sense. Thanks All!
I'm setting up a data model to report on performance of a fleet of power generators. One of my main data tables, I'll call it ProductionStop, records 'outage' events, so a typical record will identify the specific equipment by serial number [unitSN], it will include two dates, the first being the date and time the unit went off line, call it [dateOffline], the second date records when the unit returned to service, lets call it [dateOnline]. These dates are in format mm/dd/yyyy hh:mm:ss AM/PM. I also have a date lookup table currently formatted as mm/dd/yyyy.
I need a measure that will totalize the durations (hours) of all outages that have occurred within a specified time frame for any specific [unitSN].
The measure, lets call it [duration], needs to count all the hours for outage events whose start and stop times fall fully within a user selected Report time frame,
...but for the outages that have either commenced prior to beginning of the Report time frame as well as those who have continued on past the end of the Report time frame, the measure should only count the down hours that actually fell within the requested Report time frame.
for example, say 'engine1' has two outage events as follows:
unitSN --------- dateOffline ----------------------- dateOnline
engine1 ------- 12/10/2015 12:00:00 AM -------- 1/10/2016 12:00:00 AM
engine1 ------- 1/20/2016 12:00:00 AM --------- 1/21/2016 12:00:00 AM
Now, while the total duration of the two outages is the sum of the duration of both events, 768 hours, lets say my user picks pivot slicers for the period of 1/1/2016 to 1/31/2016 to report on. The total duration of outage hours should then be calculated as 240 hours since the first 20 days of the first outage don't fall within the reporting period.
Hope this makes some sense. Thanks All!