I have been struggling with creating an more advanced Gantt chart with Excel than the simple Stacked Bar Chart that is typically used in the examples I have seen in the web. For my example I would like to group multiple rows for the and entity on one row of the final Gantt. See the example data below:
Employee Start End
EMPL1 2:00 4:00
EMPL1 6:00 8:00
EMPL2 1:00 5:00
EMPL3 3:00 4:00
EMPL3 7:00 8:00
With the data above I would like the Gantt chart to group items for a single employee into a specific row as shown below. So for example, Employees 1 & 3 have two separate times, but their data is displayed on a single row in the Gantt.
TIME 1 2 3 4 5 6 7 8 9
Empl1 XXXXXXXXXXX XXXXXXXXXX
Empl2 XXXXXXXXXXXXXXXXXXXXX
Empl3 XXXXXX XXXXX
Can excel generate a report like the one below? I have done simple Gantts using a start date and a duration to create a Stacked Bar Chart and that works fine, but I haven't been able to find a way to group multiple rows of data together for a single line on a chart.
Yes, but probably easiest with a different data layout and in the example below using Insert Stacked Bar, Switch Row/Column, Y-axis categories in reverse order and X-axis range set to 1-9:
Related
I have a dataset in power bi in which I have two variables: time of entry and time of exit. The columns have a structure like this:
Time of entry Time of exit
09:00 18:03
09:00 18:00
09:00 18:00
09:02 15:00
09:05 15.02
The case is that I want to make a graph that shows me on the x-axis the hours of departure and on the y-axis the count that has had this particular hour. And the same with the entry time. Although it is possible to use two graphs (one with each subject) I would like the graph to change the axes dynamically using a slicer.
I have consulted some pages on youtube, and I am looking for the simplest possible way to do it, but I can't get it to work. I have tried configuring a parameter and DAX code.
You can achieve your goal by using field parameters:
How to activate it:
Go to Modeling Tab --> New Parameter --> Fields
Then
Create a simple measure:
HourCount =
COUNT(Timescale[Time of entry])
Then Create a line chart, put the created field parameter on the x_axis:
Resulting Screenshot:
Are there any wizards out there that can help me get a bit closer to the solution regarding this chart I'd like to do for a school project?
I have data regarding transport tasks and how long it took them. I would like to be able to plot them in a way that consecutively shows the length of each trip on the y axis while the x axis represents when the trip happened.
Example of data:
Trip number
Trip Time
Trip Start
Trip Finish
1
06-09-2021 08:28:53
08:28:53
09:14:17
2
06-09-2021 09:00:00
09:00:00
10:21:18
3
07-09-2021 10:30:00
10:30:00
11:30:00
And I would like to chart it in a following way:
You could change the layout of your data to this:
Trip No. Start/Finish
1 08:28:53
1 09:14:17
2 09:00:00
2 10:21:18
3 10:30:00
3 11:30:00
and then plot as a scatter with straight lines with markers chart, selecting each trip as a separate series. Adding each trip as a separate series means the lines should appear between each pair of points and each trip is a separate colour.
The Trip No. column is your x-axis data and the Start/Finish column is your y-axis data.
I have used the trip number rather than the Trip Time column as the x-axis to make the chart easier to read as time + date on the x axis tends to look a bit messy.
It should come out something like this:
I need to develop a stacked graph based on time intervals:
Basically I have 10 different time intervals and I want to display all the values that I have stacked on this time interval, for example:
Dataset example to plot the graph:
Time interval - Name of the group - Number of jobs
2 minutes Group A 5
2 minutes Group B 10
2 minutes Group C 15
4 minutes Group A 10
4 minutes Group D 5
6 minutes Group B 25
6 minutes .. ..
6 minutes
8 minutes
10 minutes
10 minutes
10 minutes .. ..
10 minutes Group A 10
So basically I want my X axis as the time interval (2,4,6 minutes..)
And on each bar of the time interval I want to stack the group values with a legend for the name of each group.
So on time interval of 2 minutes I would like to have a total stacked bar with value 30 (5+10+15) and this bar would need 3 different colors for each group inside (Groups A,B and C)
Is it clear?
Thank you so much for the help!
You will want To rearrange your data like this:
You can then easily generate a stacked column chart:
First of all, you'll need to organize you data in a matrix where the colums' titles are the groups and the rows' titles are the time interval values.
For that, you can use Pivot Table.
select all the data cells (including thetitles in the first line).
click the Add tab, click PivotTable.
Choose Where to place the Pivot Table(I prefer in the same sheet,
but when there's a lot of data it might be better to place it in a
new sheet).
in the left panel "PivotTable fields", drag "Time Interval" into
"columuns", "Name of the Group" into "rows" and "Number of jobs"
into "values".
because pivot table is acctually used for counting and summing, in
addition to the matrix there will be grand total values which you
can (and should) remove by right click on "Grand Total" and then
"remove Grand Total" (you acctually should do it twice, one for the
row grand total and one for the column grand total).
There might be other annoying titles such as "Sum of Number of jobs"
and "column titles", don't worry you can edit those title cells like
any other cell.
finally, select all the data in the matrix (include the groups'
names and the time intervals), click the Add tab and click the bars
chart icon and click the stacked bars chart icon.
Done!
let me know if this solved your problem or if misunderstood the problem right.
Good Luck!
I want to plot a graph in excel which has x-axis values as times(just of one day, this will be plotted everyday) and y-axis values as different applications. Suppose an application A runs jobs from 1:00 pm to 2:00 pm and then from 4:00 pm to 6:00 pm. Is there a way I can plot these time durations for each application?
I am visualizing a graph where an application has a colored bar next to it for the time period 1pm to 2pm and then it is blank until 4pm where another colored bar appears till 6pm.
Is this possible? I have the start and end times of jobs for each application. Differentiating between jobs is not important. I just need to know when the application is running and when it is idle.
Any help would be appreciated! Thanks
A little example:
The data is a label in ColumnA (for the y-axis) and 'readings' (here in B1:G1). The 'readings' are the length of the static intervals (in hours). 0 because the day has changed, then 13 because nothing happens until 1p.m., 1 because busy 1-2 p.m. - and so on.
If charted with Insert Stacked Bar the default will be to colour fill each range (interval) with a different colour. For the image, the colour for alternate 'series' has been set to match the background and one of the remaining set to match the other.
I admit changing the fill manually could get tedious if required daily for many apps but there is always VBA! And with a small fudge you may be able to 'recycle' (ie use the chart as a template and just overwrite "yesterday's" data.
Forgive me if this is not the "the best" place to ask excel questions. I looked at the data analysis page and it looks like there aren't any real questions about excel in there.
I'm trying graph the sales of various products over a period of time. I'm pulling it from the database in the format
Sales Person | End of Month | Sales | Product Type
John Doe 1/31/2010 1,000 Widget A
John Doe 1/31/2010 2,000 Widget B
John Doe 1/31/2010 3,000 Widget C
John Doe 2/28/2010 5,000 Widget A
John Doe 2/28/2010 2,000 Widget B
John Doe 2/28/2010 3,000 Widget C
I then get a summary like:
Year | Month | Product | Total Sales
2010 Jan Widget A 1,000
Widget B 2,000
Widget C 3,000
Feb Widget A 5,000
Widget B 2,000
Widget C 3,000
The problem is that I'm wanting to graph The widgets as separate lines so that I can track sales against each other. Over time.
However, excel treats it all as one "total" and then shows 3 points on the graph for each month rather than showing 3 separate lines.
No matter how I manipulate it, I can't get it to make 3 separate lines.
The example above should show how it works with two products. I show how widget A and B are two points on the same line rather than belonging to two separate lines.
I have had success in the past for a different project when I hand entered information into a spreadsheet with the format of:
End of Month | Product A Sales | Product B Sales | Product C Sales
However, my current data is not in this format and it doesn't seem I can take the same approach...
Any help is welcome.
That is an excellent example for a pivot chart. Choose Insert->Pivot Table->Pivot Chart (Excel 2007). Afterwards select your original table. Then use "End of Month" for the rows, "Product Type" for the columns, and "Sum of Sales" for data. Excel will then automatically create one line per widget type (if line is not selected as default graph type you may have to change the chart type).
Based on your description, I think what you need might be a chart like this, the X-axis would be months while within each month, there would be several bars representing data of different widgets. Here I made an example based on your data.
As for data format, you should do some preprocessing to arrange your data into several (three in this case) subsets, each subset contains monthly sale data for a widget. It could look like the format below.
Jan Feb
WidgetA 1000 5000
WidgetB 2000 2000
WidgetC 3000 3000
As you could see, this is not an original Excel chart, I actually made this chart with the Funfun Excel add-in. This add-in allows you to use JavaScript directly in Excel so you could use powerful libraries like Chart.js or D3.js to make charts. Here in this example, I used Chart.js to create this chart.
Funfun also has an online editor which allows you to test your JavaScript code. For this example, you could check the details of the code on the link below.
https://www.funfun.io/1/edit/5a25653acf76561801b732b4
If you are satisfied with the result, you could easily load the result into your Excel using the URL above. Here are some screenshots of what it looks like.
Disclosure: I'm a developer of Funfun.
You can reorder the columns in the Pivot Table:
| Product | Month-Year | Total Sales
Widget A Jan 2010 1,000
Feb 2010 5,000
Widget B Jan 2010 2,000
Feb 2010 2,000
Widget C Jan 2010 3,000
Feb 2010 3,000
That would make it easier to create three series, one for each widget. Make the chart an X-Y chart and the series will line up.