title: Error retrieving data via ARM generated dashboard
body: <p>I try to deploy a dashboard with a log analytics query-based plot. Deployment is going well, however, the result is error receiving data on the dashboard. Any ideas on how to fix it?</p>
  
  <p>I tried all the ways to generate equals to manually created ones, but it doesn't work in any case. The only difference is in the <code>PartId</code> missed section, but I don't have an idea of how to get it or provide some. Hardcoding or omitting doesn't work. Like</p>
  
  <pre><code>{
     "name": "PartId",
     "value": "deb07eda-e7e2-4d53-8bb0-9fb5c99306fc" 
  },
  </code></pre>
  
  <pre><code>{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
      "location": {
        "type": "string"
      },
      "Url": {
        "type": "string"
      },
      "appInsightName":{  
        "type":"string"
     },
     "namePrefix":{
       "type":"string"
     }
    },
    "variables": {
    },
    "resources": [
      {
        "properties": {
          "lenses": {
            "0": {
              "order": 0,
              "parts": {
                "0": {
                  "position": {
                    "x": 9,
                    "y": 0,
                    "colSpan": 6,
                    "rowSpan": 4
                  },
                  "metadata": {
                    "inputs": [
                      {
                        "name": "ComponentId",
                        "value": {
                          "SubscriptionId": "[subscription().subscriptionId]",
                          "ResourceGroup": "[resourceGroup().Name]",
                          "Name": "Percent Statistics",
                          "ResourceId": "[concat(subscription().id, '/resourceGroups/', resourceGroup().Name, '/providers/microsoft.insights/components/', parameters('appInsightName'))]"
                        }
                      },
                      {
                        "name": "Query",
                        "value": "..."
                      },
                      {
                        "name": "TimeRange",
                        "value": "P1D"
                      },
                      {
                        "name": "Dimensions",
                        "value": {
                          "xAxis": {
                            "name": "name",
                            "type": "String"
                          },
                          "yAxis": [
                            {
                              "name": "any_val2",
                              "type": "Int32"
                            }
                          ],
                          "splitBy": [],
                          "aggregation": "Sum"
                        }
                      },
                      {
                        "name": "Version",
                        "value": "1.0"
                      },
                      {
                        "name": "PartTitle",
                        "value": "Analytics"
                      },
                      {
                        "name": "PartSubTitle",
                        "value": "Percentage"
                      },
                      {
                        "name": "resourceTypeMode",
                        "value": "components"
                      },
                      {
                        "name": "ControlType",
                        "value": "AnalyticsDonut"
                      }
                    ],
                    "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart",
                    "asset": {
                      "idInputName": "ComponentId",
                      "type": "ApplicationInsights"
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "model": {
              "timeRange": {
                "value": {
                  "relative": {
                    "duration": 24,
                    "timeUnit": 1
                  }
                },
                "type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange"
              },
              "filterLocale": {
                "value": "en-us"
              },
              "filters": {
                "value": {
                  "MsPortalFx_TimeRange": {
                    "model": {
                      "format": "utc",
                      "granularity": "auto",
                      "relative": "24h"
                    },
                    "displayCache": {
                      "name": "UTC Time",
                      "value": "Past 24 hours"
                    }
                  }
                }
              }
            }
          }
        },
        "name": "[concat('db-', uniqueString(resourceGroup().id))]",
        "type": "Microsoft.Portal/dashboards",
        "location": "[parameters('location')]",
        "tags": {
          "hidden-title": ""
        },
        "apiVersion": "2015-08-01-preview"
      }
    ]
  }
  </code></pre>