Excel Chart Error from SQL Pivot Table

Copper Contributor

Hello,

I am pulling SQL values into excel and the values associated with dates and times will not plot. There are roughly 10,000 data points and the 'values' column comes in as 'general' designated formatting. I changed it to number but still no data is registering in the graph. 

 

Thank you for any suggestions to help get past this! 

 

20190906_153108.jpg

7 Replies

Hello @dpvk8,

 

First, you can take a screenshot with the built-in Windows tools. Every computer has the "Snipping Tool". Hit the Windows button and start typing "Snipping tool" and it will come up.

 

In the pivot table, the number values must be in the "Values" area, not the "Axis" (or "Rows") area of the pivot table.  Pivot charts need the numbers in the Values area.

 

So, drag the "Value" field from the Axis to the Values area. If it shows as "Count of", right-click and change the calculation options to "Sum". If that does not work, your source data may still contain text values as well as numbers and you need to clean the

Thank you for helping me.

When I move over the value field to "VALUES" and change it to sum all my data points change to 0.0000.

Capture.PNG

@Ingeborg Hawighorst 

@dpvk8  Can you post a small data sample and upload as an Excel file? click the paper clip icon below the reply box.

@Ingeborg Hawighorst I have attached one tab of this worksheet. 

@dpvk8 In your source data, the values are stored as text.  You need to convert them to real numbers. If the data comes from SQL, you may want to ensure the SQL query uses the correct data type.

 

If the data in SQL cannot be converted to numbers, you can use Power Query instead of a direct SQL query to get the same data and clean it up in the Power Query editor.

 

 

Is there a way to convert it to a number in Excel?

@dpvk8 Yes. You can use Power Query to pull the data from SQL and change the data type in Power Query. It's a lot more powerful than the old style SQL query connection.

 

If you need a quick Once-Only conversion from text to numbers, you can do this:

 

  • write a 0 into an empty cell
  • copy that cell
  • select all the cells that have numbers stored as text
  • open the Paste Special dialog from the Home ribbon and select "Add", then click OK

CoerceToNumberPasteAdd0.gif