Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
AlexandreCoutoB
Frequent Visitor

Deneb - How to add measures on another dataset

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:

AlexandreCoutoB_0-1677102372061.png

 

 

But, I need to create a dataset on Deneb like this:

AlexandreCoutoB_1-1677102512029.png

 

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.

 

1 ACCEPTED SOLUTION

A couple things:

  • You're missing the parent column. I created one based on the numbering of your IDs, although if you are going to stick with this type of hierarchy and eventually add more nodes, I'd consider handling the parent column separately. If you don't need this parent-child relationship visualized, feel free to delete the formula transform that I added to create the parent column.
  •  I moved all encodings to the update channel and that seemed to get the colors and tooltips working. Unless I want encodings to change in a particular way due to data binding changes, I'll usually always have everything in update.

Here's the updated .pbix

giammariam_0-1677174704088.png

 



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

View solution in original post

9 REPLIES 9
AlexandreCoutoB
Frequent Visitor

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:

AlexandreCoutoB_0-1677164778244.png

 

final dataset:

AlexandreCoutoB_1-1677164854208.png

 

tooltip and fill not working:

AlexandreCoutoB_2-1677165050205.png

 

 

 

 

 

@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.

giammariam_0-1677168513355.png

 





Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

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:

  • You're missing the parent column. I created one based on the numbering of your IDs, although if you are going to stick with this type of hierarchy and eventually add more nodes, I'd consider handling the parent column separately. If you don't need this parent-child relationship visualized, feel free to delete the formula transform that I added to create the parent column.
  •  I moved all encodings to the update channel and that seemed to get the colors and tooltips working. Unless I want encodings to change in a particular way due to data binding changes, I'll usually always have everything in update.

Here's the updated .pbix

giammariam_0-1677174704088.png

 



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

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:

AlexandreCoutoB_0-1677180023096.png

 

with the tooltip:

AlexandreCoutoB_3-1677181124501.png

 

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:

  • 0.0-0.49
  • 0.5-0.99
  • 1-


Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!
giammariam
Super User
Super User

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.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors