I´ve run in the problem in Vega and Vega Lite that I couldn´t generate a signal that needs a field from data.
Example:
{
"name": "summeSignal",
"update": "data('dataset')[0]['row']"
}
The same happend if I tried to calculate values in marks or signals without using a defined signal.
I tried reducing the datasets, putting the signal block on other positions in the json in the hope that this maybe a parsing problem and I tried to acces data that isn´t ready yet.
That sadly did nothing for me.
EDIT:
I found two workarounds that helped.
- adding a value to the dataset provided by powerBi: {"name": "dataset", "values": {"category": "test"}}
But that didn´t allways do the trick.
- trigger the update with a timer event: { "name": "signal", "init": "0", "on": [ { "events": [ { "type": "timer", "throttle": 500 } ], "update": "data('dataset')[0]['row']" } ] }
If there is a trigger for a data refresh or change that could be a more elegant solution, but I didn´t found any.