ShowcaseDashboard.pbix (3.9 MB)
Hi Enterprise DNA,
is there a possible way to have a dynamic currency in Deneb?
my currency table is TargetCurrency table
if i select gbp, it will have a currency symbol above for gbp, or any currency that i will choose in the slicer?
heres my deneb code
{
"data": {"name": "dataset"},
"title": {
"text": "Sales Amount",
"anchor":"start",
"fontStyle": "sans-serif",
"fontWeight": "lighter",
"fontSize": 15
},
"encoding": {
"x": {
"type": "quantitative",
"scale": {"nice": false},
"title": null,
"axis": null
}
},
"layer": [
{
"mark": {
"type": "bar",
"color": "#ccc",
"size": 40,
"yOffset": 10,
"tooltip": true
},
"encoding": {
"x": {"field": "Sales Amount LY"},
"y": {
"title": null
}
}
},
{
"mark": {
"type": "bar",
"color": "#605E5C",
"size": 20,
"yOffset": 10,
"tooltip": true
},
"encoding": {
"x": {
"field": "Sales Amount",
"legend": "Sales"
},
"color": {
"condition": [
{
"test": "datum['KPI Sales'] === 1",
"value": "red"
}
],
"value": "green"
}
}
},
{
"mark": {
"type": "tick",
"color": "orange",
"size": 50,
"yOffset": 10,
"thickness": 2,
"tooltip": true
},
"encoding": {
"x": {
"field": "Sales Amount Target",
"title": null
}
}
},
{
"mark": {
"type": "text",
"color": "black",
"dx": -5,
"dy": 0,
"xOffset": 0,
"yOffset": 50,
"angle": 0,
"align": "center",
"baseline": "bottom",
"fontSize": 10,
"fontWeight": "normal",
"limit": 0
},
"encoding": {
"text": {
"field": "Sales Amount Target",
"format": ".2s"
},
"x": {
"field": "Sales Amount Target",
"type": "quantitative"
}
}
},
{
"mark": {
"type": "text",
"color":"black",
"dx": 0,
"dy": 0,
"xOffset": 0,
"yOffset": -40,
"angle": 0,
"align": "right",
"baseline": "bottom",
"font": "sans-serif",
"fontSize": 14
,
"fontStyle": "normal",
"fontWeight": "normal",
"limit": 0
},
"encoding": {
"x": {
"aggregate": "max",
"field": "Sales Amount",
"type": "quantitative"
},
"text": {
"field": "Sales Amount",
"format": ".2s"
}
}
},
{
"mark": {
"type": "text",
"color":"black",
"dx": 0,
"dy": 0,
"xOffset": 0,
"yOffset": -40,
"angle": 0,
"align": "right",
"baseline": "top",
"font": "sans-serif",
"fontSize": 10,
"fontStyle": "normal",
"fontWeight": "normal",
"limit": 0
},
"encoding": {
"x": {
"aggregate": "max",
"field": "Sales Amount",
"type": "quantitative"
},
"text": {
"field": "Sales Amount (Label)"
}
}
}
]
}