5 Replies Latest reply on Sep 25, 2013 4:34 PM by Sylvia Lawrence

# Percentage calculation based on date filter

I have a database with minutes of service outage against all impacted days(missing dates mean, service outage was 0 minutes on that particular day). Each outage is categorized as either "Total Outage" and "Partial Outage" depending on its severity. Is there a way to calculate the percentage of each outage type for each month?

I have a screenshot attached with sample data for September. Besides, I want the "show missing values" option to show all the dates in September (not only those that are in between the earliest and latest dates). I then want to calculate the percentage of "Total Outage" and percentage of "Partial Outage" for the selected period. Say, for example, I have selected the last 4 weeks in the screenshot, the percentage calculation should show all the dates from September 1 all the way to the current date and calculate the percentage based on that.

So the answer in this case should be:

Current date: September 22, 2013

Start date: September 1, 2013 (since date filter is last 4 weeks)

Number of minutes since Sept 1: 1440 * 22  = 31680

Percentage of Partial Outage: (807/31680)*100 = 2.5%

Percentage of Total Outage: (25/31680)*100 = 0.08%

It would be perfect if I could represent this % as a pie chart.

Any help would be appreciated.

Thanks,

Sylvia

• ###### 1. Re: Percentage calculation based on date filter

It would be perfect if I could represent this % as a pie chart.

Hi Sylvia, I hope you get an answer to your question. I have a couple of minor suggestions: 1 - Don't mentions "pie charts" and 2 - Post a packaged workbook instead of a pdf.

Cheers,

--Shawn

• ###### 2. Re: Re: Percentage calculation based on date filter

Hi Shawn,

Thank you for the suggestions.

I've attached a .twbx file.

Sorry about the "pie chart" word. I won't mention it again. But just curious, I'd like to understand why

Thanks,

Sylvia

• ###### 3. Re: Percentage calculation based on date filter

BUMP

• ###### 4. Re: Percentage calculation based on date filter

Sylvia, I am so Jazzed after today's American's Cup I'm not sure I can focus on answering your original question. But I can address the pie-chart Q. Essentially pie charts of more than 2 slices are very difficult for we humans to decode. A barchart works much better. This is because we don't naturally (easily) discern the area of something. We are much better at discerning the comparative length of things (bars). So pie charts have become the bane of data vizzes. But to be honest, if there are only 2 slices (maybe 3) a pie chart works (is decoded) perfectly fine.

That's the pie chart part of your Q. The real question will need to wait for another day, since I'm still stunned that Oracle managed to even the score and push the Kiwi's to match point tomorrow. (Look in your program guide tonight and record the NBCSports network tomorrow at 1 p.m. PDT -- even if it says you'll be recording "Fishing" or some other innocuous show) -- it will be America's Cup at 1 pm PDT for about 2 hours.

--Shawn

• ###### 5. Re: Percentage calculation based on date filter

Hi Shawn,

Glad you are having fun with America's cup.

Do let me know when you are set to help me on this.

Bar charts will help but is it possible to calculate the percentage of outage minutes based on the date filter? What is the formula for the 'calculated field' that is going to use the data filter as its input?

Thanks,

Sylvia