Automating Title Based On Value

I believe this is a simple question. How do I link the text used in a title to be that of the value passed into Deneb, such as KPI in this case. For example, in the below I want “Sales Revenue” to be whatever KPI represents. Thank you!!

{
“data”: {“name”: “dataset”},
“title”:{
“anchor”: “start”,
“align”: “left”,
“orient”: “top”,
“offset”: -1,
“text”: “Sales Revenue”,
“font”: “Segoe UI”,
“fontSize”: 18,
“fontWeight”: “normal”,
“fontStyle”: “normal”
},

Hi @lancemillercpa98. AFAIK you can’t (at least I haven’t hade any success). My “workaround” so far has been to create a stand-alone text mark with the value I choose at the coordinates I want it.
Greg

Thank you Greg.

Titles support expressions, so it is possible. Titles work at the level of the entire visual, so you will need to use suitable functions to access the dataset and field directly (data and/or pluck work well, depending on structure).

However, if you want to work at the dataset/row level, @Greg is correct and it might be better to use a specific text mark. I’d recommend this approach if your KPI needs to aggregate multiple rows, so you don’t have to work this out separately at the top-level.

If you want an example of what you originally asked for, then please provide a sample workbook with your visual and what you want to see in the title. I will see if I can put it together for you.

Cheers,

DM-P

1 Like