### What happened?
When having "-- Mixed --" as data source for a panel in a Gr…afana Dashboard, and one data source is "-- Dashboard --", this panel does not update on a variable change, even though the variable change updates the referenced panel. Only when the refresh button is pressed, the panel with "-- Mixed --" and "-- Dashboard --" changes as well.
https://github.com/user-attachments/assets/80c86a99-b3a4-493a-937d-57ff15eb0a20
### What did you expect to happen?
The panel with "-- Mixed --" and "-- Dashboard --" changes when the original panel changes on a variable change.
### Did this work before?
-
### How do we reproduce it?
Minimal Setup:
Two panels in a Grafana dashboard and a variable.
The first panel queries data from a data source (in my case Postgres) and the second panel has a "-- Mixed --" data source and one of the data sources is "-- Dashboard --".
Then, the second panel does not update on a variable change, even though the first panel with the original data changes.
Json for an example dashboard:
<details>
<summary>Json from dashboard: </summary>
```json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 84,
"links": [],
"panels": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "postgres_persistdb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "12.1.1",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "postgres_persistdb"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "WITH test_data AS(\n SELECT \n(random() * $example)::float AS data,\nnow() - (random() * interval '365 days') AS created_at\nFROM generate_series(1, 20)\n)\nSELECT * FROM test_data\nORDER BY created_at ASC\n;",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "Main panel",
"type": "stat"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Mixed --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 7
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "12.1.1",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 1,
"refId": "A"
}
],
"title": "Secondary",
"type": "timeseries"
}
],
"preload": false,
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"allowCustomValue": false,
"current": {
"text": "100",
"value": "100"
},
"name": "example",
"options": [
{
"selected": false,
"text": "1",
"value": "1"
},
{
"selected": false,
"text": "10",
"value": "10"
},
{
"selected": true,
"text": "100",
"value": "100"
}
],
"query": "1,10,100",
"type": "custom"
}
]
},
"time": {
"from": "2024-11-16T04:11:15.511Z",
"to": "2025-10-19T06:06:23.432Z"
},
"timepicker": {},
"timezone": "browser",
"title": "New dashboard",
"uid": "bb711b85-b139-44eb-ba95-c7843d205ce9",
"version": 4
}
```
</details>
### Is the bug inside a dashboard panel?
_No response_
### Environment (with versions)?
Grafana: v12.1.1 (df5de8219b)
OS: MacOS
Browser: Safari
### Grafana platform?
Kubernetes
### Datasource(s)?
- Postgres
- Mixed with Dashboard