1

My data looks like this

Date    Time    Person Logged in
June 1  2PM     John
June 1  2PM     Chris
June 1  3PM     John
June 2  2PM     Chris
June 2  3PM     Bill
June 2  4PM     Bill

I want to plot a chart where the unique dates on the x axis, and for each day, the number of times each person logged in is quantified.

So you will have June 1 and June 2 as labels on x-axis. for June 1 you will have a bar with Chris (1 unit) and John (2 units) stacked. for June you will have a bar with Bill (2 units) and Chris (1 unit) stacked.

How do we do this in excel?

I am a newbie in excel charts, i tried using charts and pivot table charts but couldn't figure out using it for things involving distinct dates, and count of records. any help is appreciated - thanks.

1 Answer 1

2

Follow the below steps to get this done

To begin with, please see the sample of data I have considered for this task

enter image description here
Step-1:
Create a pivot table of your data as shown below:
enter image description here
If you are new to pivot tables, then follow these steps:

  • Go to Insert menu and select Pivot table
  • In the Pivot table dialog select you table to give the input
  • An empty pivot table will be created
  • Use the settings shown below to create your pivot

    enter image description here

Step-2
Once the pivot table is ready, from the Insert menu select 2D bar chart.
Click on the bar chart and select source data as your pivot table area and see the chart as shown below.
enter image description here

Note: I hope I have helped you in better understanding of pivot tables and charts. If you have any queries post comments below the answer

2
  • Thank you Prasanna, This worked out perfectly. Is there way you can stack those on top of each other. I tried changing the chart type to 2d bar stacked, but seems like its not able to do that.
    – Schu
    Commented Jun 3, 2016 at 20:27
  • If you want to stack by date (person upon person), drag the Person field from the Rows area to the Columns area. Commented Jun 16, 2016 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .