Subtracting minimum and maximum data from the group in Excel - excel

I have a problem with extracting the data from dataset. In my company project has some processes, which are grouped in categories. So I have one project which has many processes grouped. On the basis of column "D" I would like to get the first data and the last date from every kind of category. For example, for project 20.28 I would like to have start date from row 5 and finish date from row 4. I hundreds of projects divided into categories so making it manually isn't and option here. Below is a sample.
Sample data set

I have a solution based on consecutive filters with formulas. If this works to you I'll post here the steps.
https://drive.google.com/file/d/1pdxMGRDl_sV5wRmqIFouDQs8L43LVxgi/view?usp=sharing

Related

Excel graph with average column of increasing number of input data columns

I'm new to Excel so I don't know if it's even possible to do what I'm trying to.
I wanna build a graph with 3 columns of direct data and the last one should be an average of older data and every week I should add a new column with a newest one and that should update the graph becoming the first column, sending the previous one to the second one and so on until the previous 3rd one becomes part of the average column. I'm uploading some images to make things clearer.
Sorry about the paint images =/
If not clear, the average should be the mean values of all older columns and my graph should have always 4 columns no matter the amount of older ones.
I am open to other implementation methods that could give me a similar solution.

Spotfire: count number of occurrences based on other columns data

I'm struggling with calculating new columns as I'm still new to Spotfire.
I am given two Date columns (format: mm/dd/yyyy), one is "Created" and the other is "Closed" as shown below in the left two columns.
The end goal is to have two new columns (shown above in right two columns):
1. Date column with daily interval (format: mm/dd/yyyy)
2. Number of occurrences that where open on that day based on all rows in the "Created" and "Closed" columns
Hopefully this makes sense, please let me know if it does not. I really appreciate the help and look forward to learning - thanks!
It seems like you are trying to add records with a calculation, which is not possible. Spotfire will only work with the data that is there.
You'll need to start with a table that has one record per day.

Restructuring Excel Spreadsheet Data

I have an Excel spreadsheet with membership data, which includes each member’s coverage start date and coverage end date (if applicable) among many other data fields. I’m trying to restructure the data so that each month that the member’s coverage was effective is represented by a single row. For example, if a member has a coverage start date of 1/1/2019 and a coverage end date of 12/31/2019, the member’s information would be displayed 12 times. If the member has no coverage end date listed, then the number of rows listed for that member will be based on the number of months between the coverage start date and a date defined by the user.
To further complicate the issue, there are instances within the data that a member is displayed more than once due to changes in various coverage options so the total number of rows for a particular member will need to represent all months in which their coverage was in effect.
Any ideas/suggestions as to how to accomplish all of this?
The answer depends on your needs moving forwards. Changing the data to a per-month format and maintaining it that way is different than continuing to maintain the original data, and also needing to convert it to this new format. Consider that carefully when you choose how to do this. You might make things more difficult for yourself moving forwards.
In order to convert the data you currently have (which I assume is one line per member) to the data you want (one line per month per member) I would write a VBA script which would loop through the entire first sheet and do the steps to get it in the format I want. If you are not VBA saavy, you can do this with filters. The steps for manual filtering would be:
Find the earliest month you have (Let's say for this example that is January 2000), and filter your data for that month only.
Copy the filtered lines only to a new sheet. This is your January 2000 data.
At this point, you can either modify the lines you just copied so they indicate they are January 2000, or name the page January 2000, and keep each month on its own page.
Do the same for the next month. Continue until you have all of your data sorted by month.
At this point, you can modify and recombine the data, or leave it in separate sheets.
For a VBA solution, I would go line by line through the original data, and copy the line to each location in belongs in based on start/end dates. If separate sheets, I would pre-create all the sheets I need.
Good luck.

Top 3 Values for Multiple Categories based on hours in a week

I'm working on a charging matrix where project managers can input time to the top three contracts in each category based on a week to week basis. Right now I have a pivot table with the categories (Production, Spares, Development) with multiple contracts that were charged that week. I manually select the top three from each category and copy into a table where I have formulas creating charge numbers for the project managers to use.
The question is, is there a way I can automate selecting the top 3 contracts from each category based on number of hours for that specific week?
Pivot Table & Charging Matrix
You can use LARGE() to get the top 3 (large(data,1) etc)
Then use index() and match() to get the contract names.
I have made a simple example here, but it will not deal with duplicate results in the hours if they are in the top 3...
There are solutions to that already posted.
If I understand you correctly, you want to automate the process of finding the top 3 contracts under each category and then create the charge number based on the results.
You can do so by creating a new pivot table as demonstrated below, put the Category Name and Contract Name in the Rows field, and put the Hours in the Values field, then right click anywhere within the Row Labels column of the pivot table, go to Filter -> Top 10... -> enter 3 in the second field, then you should have the top three contracts for each category.
P.s. You can choose to sort the hours from largest to smallest, and choose NOT to show the subtotals for each category.
Once you have the list, you can enter your formula (I presume you used a formula) in corresponding cells in column H (as in my example) to create the desired charge number.

Cognos - Showing every month on x-axis when some months don't have values

Let me first say I am very new to Cognos and have mainly learned by just manipulating items within active reports. I am having an issue with creating a graph that acts like a time series. I want it to display every month (with multiple values in some months and none in others). I want to visually see gaps between data points (ex: we order products every 3 months starting in January, so we should see gaps in the months we do not order products - like February and March).
I have tried changing the label control to manual and setting display frequency to 1. However, I think my issue is that there is not any data within certain months.
You are correct in that your problem is lack of data. A standard inner join will drop rows where there is not a corresponding row in both tables, resulting in gaps.
There are two solutions available:
Use a union to create "dummy" records for each date
Manually specify an outer join between the date table and the table containing the rest of information
Since the first technique is the most common, I'll outline the basic steps for it here.
Create a new query
Add your month data item to the query
Create a 'dummy' data item for your measure. Use 0 for its expression.
If there is a date range filter in the main query apply it here
Create a union
Drag over your new query into the union
Drag over your original query into the union
Pull in the date and measure data items into the union query
Set the Aggregate Function property of the measure to Total
Use the union query as the source for your chart
For every month with measure data you will have two rows, one with the measure amount and one with 0. The two rows will be combined by the auto-group and summarize function. The measures will be added together. Anything added to 0 will end up as the original amount.
For months with no measure data, there will only be the 'dummy' row with 0 for the measure and it will be represented in your chart.

Resources