SOLVED

Graph is taking column as X-axis rather than the cell value. Does anyone know how to rectify this?

%3CLINGO-SUB%20id%3D%22lingo-sub-1365693%22%20slang%3D%22en-US%22%3EGraph%20is%20taking%20column%20as%20X-axis%20rather%20than%20the%20cell%20value.%20Does%20anyone%20know%20how%20to%20rectify%20this%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1365693%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20attempting%20to%20create%20a%20combination%20graph%20in%20excel%20representing%203%20different%20sets%20of%20data.%20On%20my%20X-axis%20I%20have%20distance%20travelled%20and%20on%20the%20Y-axis%20energy%20consumed.%20There%20is%20a%20point%20in%20my%20graph%20where%20distance%20travelled%20remains%20stagnant%2C%20but%20energy%20remaining%20increased%20due%20to%20the%20battery%20being%20charged%2C%20however%2C%20excel%20continues%20to%20increase%20the%20X-axis%20value.%20It%20is%20taking%20the%20column%20value%20as%20my%20X-axis%20rather%20than%20the%20cell%20value%20for%20distance%20travelled.%20Does%20anyone%20know%20how%20to%20fix%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20attach%20pictures%20for%20reference.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20picture%20one%20I%20have%20circled%20the%20point%20where%20195%20should%20stay%20constant%2C%20however%2C%20it%20increases.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20picture%20two%20I%20show%20the%20cell%20values%20where%20it%20stays%20constant.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1365693%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1365947%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20is%20taking%20column%20as%20X-axis%20rather%20than%20the%20cell%20value.%20Does%20anyone%20know%20how%20to%20rectify%20thi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1365947%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F658659%22%20target%3D%22_blank%22%3E%40jamaalmoosa%3C%2FA%3E%26nbsp%3B%2C%20use%20%3CSTRONG%3EScatter%3C%2FSTRONG%3E%20chart.%26nbsp%3B%20%3A-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22amit_bhola_0-1588821152347.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F189677i84749D2ED09E900E%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22amit_bhola_0-1588821152347.png%22%20alt%3D%22amit_bhola_0-1588821152347.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1365986%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20is%20taking%20column%20as%20X-axis%20rather%20than%20the%20cell%20value.%20Does%20anyone%20know%20how%20to%20rectify%20thi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1365986%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F658659%22%20target%3D%22_blank%22%3E%40jamaalmoosa%3C%2FA%3E%26nbsp%3BI%20suspect%20that%20you%20did%20not%20link%20the%20X-axis%20labels%20to%20the%20Distance%20column.%20The%20labels%20in%20your%20picture%20seem%20to%20just%20count%20the%20number%20of%20data%20points.%20Having%20said%20that%2C%20allow%20me%20to%20suggest%20another%20chart%20that%20may%20represent%20your%20data%20better.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20you%20mention%2C%20you%20have%20three%20sets%20of%20data%2C%20Time%2C%20Energy%20and%20Distance.%20However%2C%20%3CSTRONG%3Eyour%3C%2FSTRONG%3E%20chart%20only%20takes%20the%20latter%20two%20into%20account.%20Energy%20levels%20decrease%20(consumption)%20and%20increase%20(charging)%20over%20time.%20Distance%20traveled%20is%20also%20related%20to%20time%20as%20time%20progresses%20during%20both%20travel%20(consumption)%20and%20stand-still%20(i.e.%20charging).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETime%20is%20the%20factor%20that%20combines%20the%20other%20two%20and%20should%20therefore%20be%20on%20the%20X-axis.%20Then%20you%20could%20put%20the%20Energy%20part%20on%20the%20primary%20Y-axis%20and%20Distance%20on%20the%20secondary%20Y-axis.%20The%20chart%20would%20then%20look%20like%20in%20the%20picture%20below.%20I%20just%20made%20up%20some%20numbers%20to%20create%20a%20shape%20that%20resembles%20your%20picture.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202020-05-07%20at%2005.45.59.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F189680i45BCF3436A416560%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Screenshot%202020-05-07%20at%2005.45.59.png%22%20alt%3D%22Screenshot%202020-05-07%20at%2005.45.59.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1369579%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20is%20taking%20column%20as%20X-axis%20rather%20than%20the%20cell%20value.%20Does%20anyone%20know%20how%20to%20rectify%20thi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1369579%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3EThanks%20a%20lot%20for%20your%20help%2C%20much%20appreciated.%20However%2C%20I%20seemed%20to%20be%20having%20some%20trouble%20when%20attempting%20to%20put%20time%20on%20the%20X-axis%2C%20Excel%20just%20doesn't%20seem%20to%20be%20allowing%20this.%20I%20have%20attached%20my%20file%20for%20reference.%20I%20am%20working%20on%20sheet%20no.%202.%3A)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1371661%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20is%20taking%20column%20as%20X-axis%20rather%20than%20the%20cell%20value.%20Does%20anyone%20know%20how%20to%20rectify%20thi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1371661%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F658659%22%20target%3D%22_blank%22%3E%40jamaalmoosa%3C%2FA%3E%26nbsp%3BFriends%2C%20why%20not%20plotting%20scatter%20chart%20which%20is%20the%20best%20suited%20chart%20to%20treat%20numbers%20as%20%3CSTRONG%3E%3CEM%3E%22maths%3C%2FEM%3E%3C%2FSTRONG%3E%20numbers%22%20and%20plot%20graphs%20as%20on%20%22standard%20mathematical%20%3CSTRONG%3E%3CEM%3Egraph%3C%2FEM%3E%20%3CEM%3Epaper%22%3C%2FEM%3E%3C%2FSTRONG%3E%26nbsp%3Bi.e.%20Y%20on%20X%20as%20per%20scale%20decided%20by%20numbers%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Esame%20result%20is%20achieved%20without%20any%20data%20manipulation%20(interpolation)%2C%20benefit%20over%20line%20chart%20is%20that%20just%20series%20are%20selected%2C%20and%20Excel%20just%20plots%20it%20without%20us%20realizing...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(%20and%20that%20the%20time%20was%20jumped%20by%20an%20hour%20is%20just%20a%20data%20fact%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERefer%20sheet3%20of%20attachment%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22amit_bhola_0-1588877380270.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F189862i3FDE49061F32DD8C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22amit_bhola_0-1588877380270.png%22%20alt%3D%22amit_bhola_0-1588877380270.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1369869%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20is%20taking%20column%20as%20X-axis%20rather%20than%20the%20cell%20value.%20Does%20anyone%20know%20how%20to%20rectify%20thi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1369869%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F658659%22%20target%3D%22_blank%22%3E%40jamaalmoosa%3C%2FA%3E%26nbsp%3BPlease%20see%20attached.%20Not%20entirely%20sure%20that%20I%20follow%20everything%20you%20try%20to%20do%2C%20but%20your%20time%20line%20jumped%20from%202%20to%203%20hours%20(row%20195)%20where%20all%20previous%20increments%20were%20for%201%2F100%20of%20one%20hour.%20Inserted%20the%20third%20hour%20in%20hundreds%20and%20calculated%20a%20linear%20charging%20rate%2C%20during%20which%20distance%20traveled%20remains%20at%20194.%20At%20time%203.05%2C%20energy%20levels%20decrease%20again%2C%20presumable%20because%20you%20were%20driving.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202020-05-07%20at%2017.19.02.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F189793iD401CE35E8A4746D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Screenshot%202020-05-07%20at%2017.19.02.png%22%20alt%3D%22Screenshot%202020-05-07%20at%2017.19.02.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi there,

 

I'm attempting to create a combination graph in excel representing 3 different sets of data. On my X-axis I have distance travelled and on the Y-axis energy consumed. There is a point in my graph where distance travelled remains stagnant, but energy remaining increased due to the battery being charged, however, excel continues to increase the X-axis value. It is taking the column value as my X-axis rather than the cell value for distance travelled. Does anyone know how to fix this?

 

I will attach pictures for reference.

 

In picture one I have circled the point where 195 should stay constant, however, it increases.

 

In picture two I show the cell values where it stays constant.

 

Thank you

8 Replies
Highlighted

@jamaalmoosa when you want EXCEL to treat x and y values as "maths numbers" and want to plot a graph as you would do on a "graph-paper" , i.e. Y vs. X , use Scatter chart :-

 

amit_bhola_0-1588820961594.png

 

Highlighted
Highlighted
Best Response confirmed by jamaalmoosa (New Contributor)
Solution

@jamaalmoosa I suspect that you did not link the X-axis labels to the Distance column. The labels in your picture seem to just count the number of data points. Having said that, allow me to suggest another chart that may represent your data better.

 

As you mention, you have three sets of data, Time, Energy and Distance. However, your chart only takes the latter two into account. Energy levels decrease (consumption) and increase (charging) over time. Distance traveled is also related to time as time progresses during both travel (consumption) and stand-still (i.e. charging).

 

Time is the factor that combines the other two and should therefore be on the X-axis. Then you could put the Energy part on the primary Y-axis and Distance on the secondary Y-axis. The chart would then look like in the picture below. I just made up some numbers to create a shape that resembles your picture.

Screenshot 2020-05-07 at 05.45.59.png

 

Highlighted

@Riny_van_EekelenThanks a lot for your help, much appreciated. However, I seemed to be having some trouble when attempting to put time on the X-axis, Excel just doesn't seem to be allowing this. I have attached my file for reference. I am working on sheet no. 2.

Highlighted

@jamaalmoosa Please see attached. Not entirely sure that I follow everything you try to do, but your time line jumped from 2 to 3 hours (row 195) where all previous increments were for 1/100 of one hour. Inserted the third hour in hundreds and calculated a linear charging rate, during which distance traveled remains at 194. At time 3.05, energy levels decrease again, presumable because you were driving.

 

Screenshot 2020-05-07 at 17.19.02.png

Highlighted

@jamaalmoosa Friends, why not plotting scatter chart which is the best suited chart to treat numbers as "maths numbers" and plot graphs as on "standard mathematical graph paper" i.e. Y on X as per scale decided by numbers ?

 

same result is achieved without any data manipulation (interpolation), benefit over line chart is that just series are selected, and Excel just plots it without us realizing...

 

( and that the time was jumped by an hour is just a data fact )

 

Refer sheet3 of attachment

 

amit_bhola_0-1588877380270.png

 

Highlighted
Apologies for the confusion, that was a fix I was using previously due to the axis not working how I required it to. This is perfect, thank you so much for the solution and taking the time out to do this, it is really appreciated!
Highlighted

@amit_bhola Hi Amit, thank you for your solution. I was using the column due to the better visual representation but your solution is also something I was unaware of. Thank you!