Comparing Multiple Fields in One Pie Chart

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered

Hello!  I have a table that tracks the distribution of labor hours for an operation.  The table has three numeric fields that track each kind of labor hour - meetings, rework, and overhead.  There are three fields because each operation has some hours devoted to each kind of labor hour.

I would like to compare the three fields against each other in a pie chart.  For example, an ideal pie chart would have three wedges - one for meetings, one for rework, and one for overhead.  How can I compare these three fields against each other?  Picture is included below.  Thanks!




Photo of Michael Loy

Michael Loy

  • 112 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
In order to compare values in a pie chart they need to be in the same field, with some sorting (meetings, rework, overhead) to put them in the appropriate series.

Here it looks like you have 2 options.

Option 1: (My recommendation)
Make those hour entries as a child table.
you would basically have 3 child records (meetings, rework, overhead)
With two fields; Type and Amount of Hours.

Then you can create the report easily. 
This also makes it possible to add more options down the road.  it also makes it possible so you can have multiple entries of the same type, without having to edit or change old records. 
overall its a much cleaner option.

Option 2:
Summarize the Data to some parent record, and use some percent formula fields to divide the total, by each individual amount, then convert back to a number, then run the report.  (Its nasty, and not clean or expandable)
Photo of Michael Loy

Michael Loy

  • 112 Points 100 badge 2x thumb
Thanks for your reply, Matthew.  The only qualm I have about Option 1 is that the user has to create 3 records instead of one (i.e. my employees have to go into QuickBase and fill out 3 short forms rather than one slightly longer form).  Is it possible to create these three child records automatically when one parent record is created?
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
If they are doing it on a computer and not a phone, you can make that child table editable so it basically appears as a grid, and they can easily add all 3 records at once.

Let me know if you need more details on how to do that.
Photo of Michael Loy

Michael Loy

  • 112 Points 100 badge 2x thumb

Thanks Matthew.  It sounds like you're talking about Grid Edit, right? 

I think this is a workaround but would it be as clean and as user-friendly as a single form?  Or is there a way to embed a table as part of a form?

Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
Yes, when you are creating the form, you can have the child table (embedded table) automatically be in grid edit mode.  

See attached, It basically makes it all one form, but give you the expansion and reporting you need.

Photo of Michael Loy

Michael Loy

  • 112 Points 100 badge 2x thumb
Thanks Matthew, that makes sense. 
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,204 Points 20k badge 2x thumb
Here is a demo which you can add your own data to:

Pie Chart From Fields
https://haversineconsulting.quickbase.com/db/bmnu98a9f?a=td

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=567

If you need assistance implementing this solution feel free to contact me off-world using the information in my profile:

https://getsatisfaction.com/people/dandiebolt
(Edited)
Photo of Michael Loy

Michael Loy

  • 112 Points 100 badge 2x thumb
Hi Danimal, thanks so much for your help! Works like a charm.  You're a lifesaver!
(Edited)