我正在尝试重新使用以下代码进行可视化:https://github.com/PBI-David/Deneb-Showcase/tree/main/Sankey%20Chart
此可视化基于输入表,但是,我正在努力替换硬编码值。
"data": [
{
"name": "input",
"values": [
{
"category": "Total amount",
"stack": 1,
"sort": 1,
"labels": "left"
},
{
"category": "Product",
"stack": 2,
"sort": 1
},
{
"category": "Service",
"stack": 2,
"sort": 2
},
{
"category": "Visible",
"stack": 3,
"sort": 1
},
{
"category": "under the radar",
"stack": 3,
"sort": 2
},
{
"category": "No BOM",
"stack": 3,
"sort": 3
},
{
"category": "No Opportunity ID",
"stack": 3,
"sort": 4
},
{
"category": "Highway Robbery",
"stack": 3,
"sort": 5
},
{
"source": "Total amount",
"destination": "Product",
"value": 20
},
{
"source": "Total amount",
"destination": "Service",
"value": 1.9
},
{
"source": "Product",
"destination": "Visible",
"value": 11.8
},
{
"source": "Product",
"destination": "under the radar",
"value": 11.8
},
{
"source": "Product",
"destination": "No BOM",
"value": 11.8
},
{
> "source": "Product",
"destination": "No Opportunity ID",
"value": 11.8
},
{
"source": "Product",
"destination": "Highway Robbery",
"value": 11.8
}
]
},
我尝试过通过信号、表达式和转换以多种不同的方式直接引用 PowerBI 中的数据集,但是,我仍然感到困惑。
如何动态填充这些字段?
如果您能给我指出正确的方向,我将非常感激。
例如,当尝试信号时(即使将它们设置为相同的值)
{
"name": "SignalProductToVisible",
"value": 11.8
}
(...)
{
"source": "Product",
"destination": "Visible",
"value": {"signal": "SignalProductToVisible"}
}
我收到[错误] SVG 路径无效,参数类型不正确,因为该值似乎始终未定义。