help with deneb
6 TopicsConditional Distinct Count of Values
In a working Deneb visual that displays survey data, I have a relatively flat dataset structured this way: When aggregating this data, I want a count of distinct values for "person" - ONLY for rows where "complete" = 0. Also, I do not want to filter the data to achieve this, because I need the filtered rows later for other purposes. My first strategy was to calculate a new column called "distinctPerson" that listed the person column value if "complete" == 1 and showed null otherwise, but the "distinct" count sees 'null' as a distinct value rather than ignoring it. Here is a link to the example in the vega editor. As you can see from the chart, "null" values - which are cases where there is no value in the person column because "complete" = 0 - are counted as distinct values: How can I remove these null values from the count (not the chart, the actual aggregation in the background) without filtering the dataset to "datum.Completed == 1" since this would remove necessary information for later? I have tried the following concepts without success: Perform transforms within a lookup (this doesn't seem to work - maybe I'm missing something?) Define and transform an additional data object that references my initial named dataset and join onto original (I haven't figured out a way to get this working) If I'm missing something major, please let me know - or if one of the two failed attempts I listed is likely to work, and I'm just using the wrong syntax, let me know and I can provide more info. Thanks in advance! giammariam UPDATE: pbix containning the visual and dataset here.SolvedNavigation + Filtering in a custom Deneb Vega visual
Dear reader, I'm a consultant currently working on a Power BI dashboard which has required me to include a custom visualization. For this I used a Gantt Chart template created by David Bacci (see Deneb-Showcase/Gantt Chart at main · PBI-David/Deneb-Showcase · GitHub for the code) The standard template looks as follows: The client is asking me to implement a feature that allows users to select a value in the "Tasks" column, e.g. "Story boarding", and navigate to another page with a tailored view based on this selection. So, for example, one would click on "Story boarding" in the column and the dashboard will then navigate to another tab. And in this tab the visuals will be filtered such that "Task == Story boarding". I have discussed within my team that this is likely impossible, but we wanted to know for sure. An alternative solution is of course also welcome! Unfortunately, an invisible button overlay will not work, because in our case there will be a lot of rows and scrolling will be required. Besides, the visual will be dynamically updated. Thanks a lot in advance! 🙂Deneb Graph/Chart Issue: No Data Displayed in Embedded Power BI Report
I have tried both the standard and standalone versions of Deneb, but I keep encountering an issue where the data does not display in the chart, such as the bars in my simple bar chart in my Power Embedded Report used in React. Everything else in my Power Embedded Report functions correctly except for the Deneb chart. This leads me to believe that Deneb is either misconfigured, there is a glitch, or the dataset I am using is too large. However, the Deneb chart works properly when viewing the report directly on the Power BI app website. But when I try loading it on my domain using powerbi-client-react, it does not show any bars (data); it only displays an empty chart with labels on the x-axis. Yes, the data does appear in the table when I right-click the chart and select "View Table," so the data is there and visible. I have also tried both SVG and canvas rendering methods, but neither made a difference. No, there are no errors in my console, and Deneb is loading, showing me the version and everything, so it should work, but it does load in any data. Here is the code I am using in my deneb-chart: Specification: { "data": [{"name": "dataset"}], "scales": [ { "name": "xscale", "type": "band", "domain": { "data": "dataset", "field": "productname" }, "range": "width", "padding": 0.1, "round": true }, { "name": "yscale", "domain": { "data": "dataset", "field": "Sum of total_sold" }, "nice": true, "range": "height" } ], "axes": [ { "orient": "bottom", "scale": "xscale", "title": "productname", "labelAngle": -90, "labelAlign": "right", "labelBaseline": "middle" }, { "scale": "yscale", "orient": "left", "title": "Sum of total_sold", "tickCount": 5 } ], "marks": [ { "type": "rect", "from": {"data": "dataset"}, "encode": { "enter": { "x": { "scale": "xscale", "field": "productname" }, "width": {"value": 5}, "y": { "scale": "yscale", "field": "Sum of total_sold" }, "y2": { "scale": "yscale", "value": 0 } } } } ] } Config: { "autosize": { "contains": "padding", "type": "fit" } } Here is how it should look like (what it looks like viewing it in the powerbi app website): And this is how it looks using power bi embedded in my react project: And the weird thing is, it worked like the first time using the chart but after a while it went to 50/50 when loading in the embedded report and now it never works.Deneb Vega - Gradient based on values of a specific column instead of fixed offsets
Hi everyone! I'm trying to create an area chart with gradient on Deneb with Vega. The idea is to set the colors of the gradient based on the values of my column called "percentage_score". This particular column have values varying from 0.0 to 100.0. If the value of the "percentage_score" in a particular month is bettween 0.0 and 50.0 i want the area to be red, from 50 it should start to become yellow and only become green if gets to 100.0. Here is what I got so far: As you can see its not correct because it should be green only if the value is 100.0. I'm not being able to find a way to make the gradient colors behave based on my "percentage_score" column. Here is a piece of my dataset: There is a way to bring the "percentage_score" to the offset values? For now the colors offset are behaving based on the area chart instead of the scores: "marks": [ { "name": "layer_0_layer_0_marks", "type": "area", "style": ["area"], "sort": {"field": "month_order_fy", "order": "ascending"}, "from": {"data": "data_1"}, "encode": { "update": { "opacity": {"value": 1}, "orient": {"value": "vertical"}, "fill": { "value": { "x1": 1, "y1": 1, "gradient": "linear", "stops": [ {"offset": 0, "color": "#ff1414"}, {"offset": 0.5, "color": "#ffdf48"}, {"offset": 1, "color": "#00FFCD"} ] } }, "description": { "signal": "\"Month-Year: \" + (isValid(datum[\"Month-Year\"]) ? datum[\"Month-Year\"] : \"\"+datum[\"Month-Year\"]) + \"; percentage_score: \" + (format(datum[\"percentage_score\"], \"\"))" }, "x": {"scale": "x", "field": "Month-Year", "band": 0.5}, "y": {"scale": "y", "field": "percentage_score_end"}, "y2": {"scale": "y", "field": "percentage_score_start"}, "defined": { "signal": "isValid(datum[\"percentage_score\"]) && isFinite(+datum[\"percentage_score\"])" } } } }1.5KViews0likes2CommentsDeneb - 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: 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.SolvedDeneb - change labelFontWeight for one value in an axis label
I have a text field ['Region'] with four values {Global, AMER, APAC, EMEA}. I have a simple bar chart and want the label to be bold only for 'Global'. I tried: "encoding": { "y": { "field": "Region", "type": "nominal", "axis": { "offset": 10, "title": null, "labelFontWeight": { "condition": {"test": "datum['Region'] == 'Global'","value":"bold"}, "value":"normal" } but there is no change to the label font weight. What is interesting is that I switched the result conditions, making the '==Global' "normal" and the else "bold" and it changed font weight on all the labels to bold. That leads me to believe that my condition is never being evaluated as true. Any ideas why? Is what I want to do - changing a signal value in an axis label - possible?Solved