Hi,
I want to replicate the sunburst example from Vega on my PBI here: https://vega.github.io/vega/examples/sunburst/
But, my values are not in a table, they are measures. So, I need to combine them on a hard-coded table and I'm getting this situation:
Deneb is importing all measures as a table, like this:
But, I need to create a dataset on Deneb like this:
Any ideas on how I can do this "merge"? I think that he is not getting the values because they are on another table, but I also tried methods to do a lookup or transform it in a signal but I was unsuccessful in both cases.
Solved! Go to Solution.
A couple things:
Hi @giammariam ,
Thanks for your help, I tried this option, but I separated it into different datasets, then I "joined" them with a lookup and ended up with what I wanted. But for some reason, Vega does not recognize the values to use on tooltips or fill with a gradient.
I'm giving you some screenshots, but if it doesn't help, I'll try to generate a sanitized .pbix.
folded dataset:
final dataset:
tooltip and fill not working:
@AlexandreCoutoB, at first glance, nothing jumps out as being off with what you've posted. I took my best guess at creating a spec somewhat similar to what you have (minus having multiple datasets).
Check out this gist. Maybe you can look at it against your spec and figure out where the disconnect is. If this doesn't help, then sharing a .pbix may be the best way forward.
Hi @giammariam ,
I did this test too, and it works on Vega editor with a pre-built dataset, my problem is how to create this dataset on Deneb. It seems like it cannot get the field values after a lookup.
As Deneb brings me the measures in this format, I need to do all those transformations on the data until I get the final format required by Vega.
Take a look at my spec here, it's very close to what I did and didn't work on Deneb. I'm creating a sanitized .pbix in the meanwhile.
Hi, here is the .pbix file with the same spec I did on the Vega editor and not working on Deneb.
A couple things:
Hi @giammariam ,
It worked now! Sorry for the silly mistake of the missing column, and the encoding approach works for me.
Just an additional quick question, do you know how I can configure a custom linear gradient with the following config? I want to ensure that the color #FF1414 is for calc=0, not the lowest value of calc.
if calc = 0.0, then color = #FF1414
if calc = 0.5, then color = #FFDF4B
if calc = 1.0, then color = #00FFCD
Solution:
with the tooltip:
Try a threshold scale. Something like:
{
"name": "color",
"type": "threshold",
"domain": [0.0, 1.0],
"range": ["#FF1414", "#FFDF48", "#00FFCD"]
}
You may need to play with the domain values.
I'm assuming you want your quantiles to be:
Hey @AlexandreCoutoB. Look into performing a fold transform on your original dataset to get them into key-value pairs. This will be more aligned to the table format you're looking for.
If this gets you moving, please consider kudoing this reply and choosing it as the solution. If not, I would be happy to help further. Please provide a sanitized .pbix (here's how) so I can look into this.