Forum Discussion
Expression.Error: There were too many elements in the enumeration to complete the operation. Details
Hello. I have json files from Azure Blob Storage as a data source. In the files there are energy consumption values. I would like to only graph the power consumption over time. For this reason I deleted all the other values and ended up with this table:
Name Value
| power_mw | 0 |
| timestamp | 2019-04-24T11:34:26.472475 |
| power_mw | 0 |
| timestamp | 2019-04-24T11:34:41.602568 |
| power_mw | 0 |
| timestamp | 2019-04-24T11:34:56.377102 |
| power_mw | 0 |
| timestamp | 2019-04-24T11:35:11.332657 |
| power_mw | 1843 |
| timestamp | 2019-04-24T11:35:26.430702 |
| power_mw | 1762 |
| timestamp | 2019-04-24T11:35:41.381805 |
| power_mw | 1787 |
| timestamp | 2019-04-24T11:35:56.333847 |
| power_mw | 4112 |
| timestamp | 2019-04-24T11:36:11.303751 |
| power_mw | 1596 |
| timestamp | 2019-04-24T11:36:26.403370 |
| power_mw | 2048 |
| timestamp | 2019-04-24T11:36:41.496519 |
| power_mw | 1630 |
| timestamp | 2019-04-24T11:36:56.302972 |
| power_mw | 0 |
| timestamp | 2019-04-24T11:37:11.417660 |
| power_mw | 0 |
| timestamp | 2019-04-24T11:37:26.375462 |
| power_mw | 0 |
| timestamp | 2019-04-24T11:37:41.471550 |
Since I only want to graph the power over time, I though I need to end up with a table with only two columns (one for the timestamp and one for the power). I used the function "pivot column" and I selected "don't aggregate". This is the error I get. Can anyone please help? I am new to this.
Expression.Error: There were too many elements in the enumeration to complete the operation.
Details:
List
1 Reply
- v-juanli-msftCommunity Support
Hi Anonymous
1.Keep the "Name" and "Value" columns in the sort order as your screenshot, then create a index column from 1
2. click on "Name", used the function "pivot column" and I selected "don't aggregate" for "Value" column
3. fill up for "timestamp", fill down for "power_mw"
4.remove index column,
then click on "power_mw" and "timestamp" columns, remove duplicates columns,
reoder columns-drag column "timestamp" from right to left
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.