{"id":2270,"date":"2025-10-14T16:41:08","date_gmt":"2025-10-14T05:41:08","guid":{"rendered":"https:\/\/www.dynamicwebtraining.com.au\/blog\/?p=2270"},"modified":"2026-03-25T15:59:08","modified_gmt":"2026-03-25T04:59:08","slug":"using-chatgpt-5-and-denab-for-custom-power-bi-visuals","status":"publish","type":"post","link":"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals","title":{"rendered":"How to use GPT-5 and Deneb for Custom Power BI Visuals: Late Delivery Risk Diagnostics"},"content":{"rendered":"\n<p>Timely delivery is a critical metric in supply chain operations; late shipments can affect customer satisfaction, loyalty and impact revenue. Identifying and reducing late deliveries can significantly boost customer retention and reduce acquisition costs.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Traditional <a href=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/guide-to-free-power-bi-visuals\">Power BI visuals<\/a> have limitations for visualising multi-dimensional delay data. For example, a simple bar chart or matrix might show overall lateness vs. on-time counts, but it\u2019s hard to simultaneously analyse multiple factors (like <strong>region<\/strong> and <strong>shipping mode<\/strong>) in one view. This is where a custom visual can help.<\/p>\n\n\n\n<p>In this blog, we demonstrate how to use <strong>Deneb<\/strong> (a custom Power BI visual that leverages Vega-Lite) together with <strong>GPT-5<\/strong> to draft and build a specification via prompts for supply chain delay diagnostics.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-h-3-font-size\">Dataset Overview: DataCo Supply Chain and Late_delivery_risk<\/h2>\n\n\n\n<p>Our example uses the DataCo Smart Supply Chain dataset, which contains over 180,000 orders from 2015\u20132019 across global markets. Each order has a field called <strong>Late_delivery_risk<\/strong>, a binary flag indicating whether that order was delivered late (1 = Yes, 0 = No). Approximately 54.8% of orders in this dataset are labelled as late deliveries, making late shipments a widespread issue worth analysing. Key fields from the dataset we will use include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Late_delivery_risk:<\/strong> Indicates if a shipment was late (1) or not late (0) \u2013 this will be our core metric, essentially the percentage of orders delivered late.<\/li>\n\n\n\n<li><strong>Shipping Mode:<\/strong> The service class or speed of shipment. The dataset includes four modes \u2013 Standard Class, First Class, Second Class, and Same Day.<\/li>\n\n\n\n<li><strong>Market (Region):<\/strong> A categorical field grouping delivery destinations into broad regions: Africa, Europe, LATAM (Latin America), Pacific Asia, and USCA (USA &amp; Canada). We will treat the <strong>Market<\/strong> as the \u201cregion\u201d in our analysis to see geographical patterns of delay.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading has-h-3-font-size\">Why Focus on Late Delivery Risk?<\/h2>\n\n\n\n<p>This field directly captures the outcome we care about \u2013 whether an order missed its delivery target. By analysing patterns in late delivery risk, companies can uncover problem areas in their supply chain. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Customer Satisfaction &amp; Retention:<\/strong> Consistently late deliveries damage customer trust. If you can get more packages to customers on time, they are more likely to stay with you and spend more money with you over time.<\/li>\n\n\n\n<li><strong>Operational Efficiency:<\/strong> If a lot of shipments are late, it could mean that there are problems with a specific warehouse, region, or carrier. Taking care of these can make things run more smoothly.<\/li>\n\n\n\n<li><strong>Cost Implications:<\/strong> Late shipments usually cost more (for example, urgent shipping upgrades, refunds, or discounts to make up for the delay).<\/li>\n<\/ul>\n\n\n\n<p>Our goal is to visualise this metric across different dimensions to diagnose where and how delays are occurring and enable targeted improvements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-h-3-font-size\">Choosing the Right Visual: Diagnosing the Reason Behind Late Deliveries<\/h2>\n\n\n\n<p>Before writing any code or prompting GPT-5, we sketched out the visualisation concept. The core question we want to answer is: <strong>How do late delivery rates vary by region and by shipping mode?<\/strong> A suitable design should let us compare late delivery percentages across these two dimensions at a glance.<\/p>\n\n\n\n<p><strong>Conceptual wireframe:<\/strong> <em>A heatmap design showing Late Delivery Risk (%) by region (rows) and shipping mode (columns). Darker colours indicate a higher percentage of late deliveries in that category.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"e8caa0\" data-has-transparency=\"false\" style=\"--dominant-color: #e8caa0;\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/1-chatgpt5-denab-1024x683.webp\" alt=\"ChatGPT 5 - Conceptual wireframe \" class=\"wp-image-2271 not-transparent\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/1-chatgpt5-denab-1024x683.webp 1024w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/1-chatgpt5-denab-300x200.webp 300w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/1-chatgpt5-denab-1200x800.webp 1200w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/1-chatgpt5-denab.webp 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><em>In this example wireframe, each cell\u2019s label is the % of orders that were delivered late for the given region and shipping mode. An analyst can immediately see which regions and shipping methods are most problematic (orange\/dark cells) and which are performing well (yellow\/light cells).<\/em><\/p>\n\n\n\n<p><strong>Chosen Visual \u2013 Heatmap of Late Delivery % by Region vs. Shipping Mode:<\/strong> We decided on a heatmap because it intuitively highlights high vs. low values with colour intensity. One axis of the heatmap will list the <strong>Regions<\/strong> (markets), and the other axis will list the <strong>Shipping Modes<\/strong>. Each cell in the grid will display the percentage of deliveries that were late for that combination of region and shipping mode, using a colour scale (e.g., yellow-to-orange, where dark orange indicates a high late percentage). This way, we can quickly spot, for example, if <em>\u201cStandard Class\u201d shipments to LATAM<\/em> have an unusually high late rate, or if <em>\u201cSame Day\u201d deliveries in US\/Canada<\/em> are almost always on time.<\/p>\n\n\n\n<p><strong><em>Such a visual would be hard to create with native Power BI charts alone, but it\u2019s straightforward with a custom Vega-Lite specification.<\/em><\/strong><\/p>\n\n\n\n<p>In our case, we opted for the <strong>Deneb<\/strong> custom visual route for full control \u2013 yielding a true heatmap with a fixed colour legend, percentage labels\/tooltips, and custom ordering of rows\/columns.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-h-3-font-size\">Implementing the Visual in Power BI (Deneb Setup)<\/h2>\n\n\n\n<p><strong>1.<\/strong> First, we need to set up the Deneb visual and bind our data. Deneb is available from AppSource as a certified custom visual, so you can add it via <strong>Insert &gt; More Visuals from AppSource<\/strong>. Once added, the Deneb icon appears in the build pane.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-dominant-color=\"191d21\" data-has-transparency=\"false\" style=\"--dominant-color: #191d21;\" loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"962\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/2-chatgpt5-denab.webp\" alt=\"ChatGPT 5 - Visuals from AppStore \" class=\"wp-image-2273 not-transparent\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/2-chatgpt5-denab.webp 560w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/2-chatgpt5-denab-175x300.webp 175w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/figure>\n\n\n\n<p><strong>2.<\/strong> <strong>Add the Deneb visual to the report page<\/strong> and resize it as needed. In the Build pane, we added <strong>Market<\/strong>, <strong>Shipping Mode<\/strong>, and <strong>Late_delivery_risk<\/strong> into Deneb\u2019s <em>Values<\/em> field well. Deneb automatically makes these available to the Vega-Lite spec (as the dataset table we referenced in JSON). Ensure <em>Late_delivery_risk<\/em> is it\u2019s not being summed; set it to Don\u2019t <em>summarize<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"c9c8c9\" data-has-transparency=\"true\" style=\"--dominant-color: #c9c8c9;\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"514\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/3-chatgpt5-denab-1024x514.webp\" alt=\"ChatGPT 5 - Add Visuals to report page\" class=\"wp-image-2274 has-transparency\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/3-chatgpt5-denab-1024x514.webp 1024w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/3-chatgpt5-denab-300x151.webp 300w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/3-chatgpt5-denab-1200x602.webp 1200w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/3-chatgpt5-denab.webp 1211w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>3.<\/strong> <strong>Open the Deneb visual editor <\/strong>by selecting the visual and clicking <em>Edit<\/em>. Select Vega-Lite and click on create.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"f3f2f2\" data-has-transparency=\"false\" style=\"--dominant-color: #f3f2f2;\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/4-chatgpt5-denab-1024x512.webp\" alt=\"ChatGPT 5 - Open Deneb Visual Editor\" class=\"wp-image-2275 not-transparent\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/4-chatgpt5-denab-1024x512.webp 1024w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/4-chatgpt5-denab-300x150.webp 300w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/4-chatgpt5-denab-1200x600.webp 1200w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/4-chatgpt5-denab.webp 1389w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>4.<\/strong> You\u2019ll see a code editor where you can paste the Vega-Lite JSON.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"fcfbfb\" data-has-transparency=\"false\" style=\"--dominant-color: #fcfbfb;\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"580\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/5-chatgpt5-denab-1024x580.webp\" alt=\"ChatGPT 5 - Deneb Visual Code Editor\" class=\"wp-image-2276 not-transparent\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/5-chatgpt5-denab-1024x580.webp 1024w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/5-chatgpt5-denab-300x170.webp 300w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/5-chatgpt5-denab.webp 1130w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading has-h-3-font-size\">Building the Vega-Lite Spec with GPT-5<\/h2>\n\n\n\n<p>Creating a custom visual in Power BI via Deneb means writing a Vega-Lite JSON specification for the chart. Hand-coding this spec can be time-consuming if you\u2019re not already fluent in Vega-Lite. Here\u2019s where <strong>GPT-5<\/strong> comes in as a coding assistant. Large language models have been trained on lots of code and JSON (including Vega\/Vega-Lite specs), so they can generate plausible chart specs given the right prompt. We leveraged GPT-5 to help write the heatmap specification, approaching the task in a step-by-step, iterative manner.<\/p>\n\n\n\n<p><strong>Outline the Requirements in a Prompt:<\/strong> We began by writing a detailed prompt for GPT-5 describing the visualisation and our data. This prompt included:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"e2ddd5\" data-has-transparency=\"false\" style=\"--dominant-color: #e2ddd5;\" loading=\"lazy\" decoding=\"async\" width=\"829\" height=\"1024\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/6-chatgpt5-denab-829x1024.webp\" alt=\"ChatGPT 5 - Outline the requirements in a prompt\" class=\"wp-image-2277 not-transparent\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/6-chatgpt5-denab-829x1024.webp 829w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/6-chatgpt5-denab-243x300.webp 243w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/6-chatgpt5-denab.webp 1024w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" \/><\/figure>\n\n\n\n<p><strong>Final Initial Prompt:<\/strong><\/p>\n\n\n\n<p>\u201cCreate a Vega-Lite JSON spec for a Power BI Deneb visual to visualise late delivery risk.<\/p>\n\n\n\n<p>Dataset fields:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Market \u2192 Y-axis (categorical).<\/li>\n\n\n\n<li>Shipping Mode \u2192 X-axis (categorical).<\/li>\n\n\n\n<li>Late_delivery_risk (0 = on time, 1 = late) \u2192 compute percentage late.<\/li>\n<\/ul>\n\n\n\n<p>Requirements:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Chart type: Heatmap (rectangular grid).<\/li>\n\n\n\n<li>Each cell\u2019s colour encodes the % of late deliveries for that region\/mode.<\/li>\n\n\n\n<li>Use &#8220;data&#8221;: {&#8220;name&#8221;: &#8220;dataset&#8221;} as the source (Deneb convention).<\/li>\n\n\n\n<li>Aggregate by Market + Shipping Mode, calculate mean of Late_delivery_risk (fraction late).<\/li>\n\n\n\n<li>Map colour scale from yellow (low %) to orange (high %), domain [0,1].<\/li>\n\n\n\n<li>Show tooltip with Region, Mode, and % Late Deliveries formatted nicely (e.g. \u201c57%\u201d).<\/li>\n\n\n\n<li>Add legend titled \u201c% Late Deliveries\u201d, values formatted as percentages.<\/li>\n\n\n\n<li>Rotate x-axis labels by 45\u00b0 for readability.<\/li>\n\n\n\n<li>Clean layout: remove gridlines and chart border.\u201d<\/li>\n<\/ul>\n\n\n\n<p><strong>GPT-5\u2019s Initial Output:<\/strong> GPT-5 responded with the following Vega-Lite JSON specification.<\/p>\n\n\n\n<pre class=\"wp-block-code has-background-color has-primary-background-color has-text-color has-background has-link-color has-small-font-size wp-elements-a812fe382fedbd78f1f0e9b335f4f40e\"><code>{\n  \"$schema\": \"https:\/\/vega.github.io\/schema\/vega-lite\/v5.json\",\n  \"data\": {\"name\": \"dataset\"},\n  \"mark\": {\n    \"type\": \"rect\",\n    \"stroke\": null\n  },\n  \"encoding\": {\n    \"x\": {\n      \"field\": \"Shipping Mode\",\n      \"type\": \"ordinal\",\n      \"axis\": {\n        \"labelAngle\": 45,\n        \"title\": \"Shipping Mode\",\n        \"grid\": false\n      }\n    },\n    \"y\": {\n      \"field\": \"Market\",\n      \"type\": \"ordinal\",\n      \"axis\": {\n        \"title\": \"Region\",\n        \"grid\": false\n      }\n    },\n    \"color\": {\n      \"aggregate\": \"mean\",\n      \"field\": \"Late_delivery_risk\",\n      \"type\": \"quantitative\",\n      \"scale\": {\n        \"domain\": &#91;0, 1],\n        \"range\": &#91;\"#ffffb2\", \"#fe9929\"]\n      },\n      \"legend\": {\n        \"title\": \"% Late Deliveries\",\n        \"format\": \".0%\"\n      }\n    },\n    \"tooltip\": &#91;\n      {\"field\": \"Market\", \"title\": \"Region\"},\n      {\"field\": \"Shipping Mode\", \"title\": \"Mode\"},\n      {\n        \"aggregate\": \"mean\",\n        \"field\": \"Late_delivery_risk\",\n        \"title\": \"% Late Deliveries\",\n        \"format\": \".0%\"\n      }\n    ]\n  },\n  \"config\": {\n    \"axis\": {\n      \"domain\": false,\n      \"grid\": false\n    },\n    \"view\": {\n      \"stroke\": null\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Testing and iteration:<\/strong> We loaded GPT-5\u2019s initial Vega-Lite specifications into the Deneb editor.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-dominant-color=\"fbe19e\" data-has-transparency=\"false\" style=\"--dominant-color: #fbe19e;\" loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"663\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/7-chatgpt5-denab.webp\" alt=\"ChatGPT 5 - Shipping Mode\" class=\"wp-image-2278 not-transparent\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/7-chatgpt5-denab.webp 876w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/7-chatgpt5-denab-300x227.webp 300w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<p><em><strong>That revealed an issue: <\/strong>every cell showed roughly \u201c50%\u201d late risk, indicating the spec wasn\u2019t yet calculating percentages by region and mode correctly.<\/em><\/p>\n\n\n\n<p><em>So, we went back to GPT-5 with follow-up instructions to address the issues:<\/em><\/p>\n\n\n\n<p><strong>We asked GPT-4, Why does every cell show roughly &#8216;50%&#8217; late risk?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"242424\" data-has-transparency=\"false\" style=\"--dominant-color: #242424;\" loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"1024\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/8-chatgpt5-denab-885x1024.webp\" alt=\"ChatGPT 5 - The Response\" class=\"wp-image-2279 not-transparent\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/8-chatgpt5-denab-885x1024.webp 885w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/8-chatgpt5-denab-259x300.webp 259w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/8-chatgpt5-denab-1327x1536.webp 1327w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/8-chatgpt5-denab-1770x2048.webp 1770w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/8-chatgpt5-denab-1200x1389.webp 1200w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/8-chatgpt5-denab.webp 1919w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/figure>\n\n\n\n<p>Based on prompt\u2013adjust\u2013review cycle, we created <strong>Pct Late<\/strong> DAX Measure given by GPT-5 to compute the average of the late flag, so Power BI itself can provide the already-aggregated percentage for each category. Remove the <strong>Late_delivery_risk<\/strong> from the Deneb fields and add the <strong>Pct Late<\/strong> instead.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em>Pct Late = AVERAGE ( &#8216;Table'[Late_delivery_risk] )<\/em><\/strong><\/p>\n\n\n\n<p>Further, we tuned the Heatmap by asking GPT-5 to add text labels on each rect mark to directly show the % value inside each cell.<\/p>\n\n\n\n<p>Below is a final version of the final <strong>Vega-Lite JSON spec<\/strong> for the late delivery risk heatmap that met all our requirements:<\/p>\n\n\n\n<pre class=\"wp-block-code has-background-color has-primary-background-color has-text-color has-background has-link-color has-small-font-size wp-elements-ab2b110e52398fac022d48a7c1187195\"><code>{\n&nbsp; \"$schema\": \"https:\/\/vega.github.io\/schema\/vega-lite\/v5.json\",\n&nbsp; \"data\": {\"name\": \"dataset\"},\n&nbsp; \"encoding\": {\n&nbsp; &nbsp; \"x\": {\n&nbsp; &nbsp; &nbsp; \"field\": \"Shipping Mode\",\n&nbsp; &nbsp; &nbsp; \"type\": \"ordinal\",\n&nbsp; &nbsp; &nbsp; \"axis\": { \"labelAngle\": 45, \"title\": \"Shipping Mode\", \"grid\": false }\n&nbsp; &nbsp; },\n&nbsp; &nbsp; \"y\": {\n&nbsp; &nbsp; &nbsp; \"field\": \"Market\",\n&nbsp; &nbsp; &nbsp; \"type\": \"ordinal\",\n&nbsp; &nbsp; &nbsp; \"axis\": { \"title\": \"Region\", \"grid\": false }\n&nbsp; &nbsp; }\n&nbsp; },\n&nbsp; \"layer\": &#91;\n&nbsp; &nbsp; {\n&nbsp; &nbsp; &nbsp; \"mark\": { \"type\": \"rect\", \"stroke\": null },\n&nbsp; &nbsp; &nbsp; \"encoding\": {\n&nbsp; &nbsp; &nbsp; &nbsp; \"color\": {\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"field\": \"Pct Late\",\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"type\": \"quantitative\",\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"scale\": { \"domain\": &#91;0, 1], \"range\": &#91;\"#ffffb2\", \"#fe9929\"] },\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"legend\": { \"title\": \"% Late Deliveries\", \"format\": \".0%\" }\n&nbsp; &nbsp; &nbsp; &nbsp; },\n&nbsp; &nbsp; &nbsp; &nbsp; \"tooltip\": &#91;\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { \"field\": \"Market\", \"title\": \"Region\" },\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { \"field\": \"Shipping Mode\", \"title\": \"Mode\" },\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { \"field\": \"Pct Late\", \"type\": \"quantitative\", \"title\": \"% Late Deliveries\", \"format\": \".0%\" }\n&nbsp; &nbsp; &nbsp; &nbsp; ]\n&nbsp; &nbsp; &nbsp; }\n&nbsp; &nbsp; },\n&nbsp; &nbsp; {\n&nbsp; &nbsp; &nbsp; \"mark\": { \"type\": \"text\", \"baseline\": \"middle\", \"fontWeight\": \"bold\", \"size\": 12 },\n&nbsp; &nbsp; &nbsp; \"encoding\": {\n&nbsp; &nbsp; &nbsp; &nbsp; \"text\": { \"field\": \"Pct Late\", \"type\": \"quantitative\", \"format\": \".0%\" },\n&nbsp; &nbsp; &nbsp; &nbsp; \"color\": {\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"condition\": { \"test\": \"datum&#91;'Pct Late'] &gt;= 0.6\", \"value\": \"white\" },\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"value\": \"black\"\n&nbsp; &nbsp; &nbsp; &nbsp; }\n&nbsp; &nbsp; &nbsp; }\n&nbsp; &nbsp; }\n&nbsp; ],\n&nbsp; \"config\": {\n&nbsp; &nbsp; \"axis\": { \"domain\": false, \"grid\": false },\n&nbsp; &nbsp; \"view\": { \"stroke\": null }\n&nbsp; }\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-dominant-color=\"fbd99a\" data-has-transparency=\"false\" style=\"--dominant-color: #fbd99a;\" loading=\"lazy\" decoding=\"async\" width=\"763\" height=\"603\" src=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/9-chatgpt5-denab.webp\" alt=\"ChatGPT 5 - Final Shipping Mode\" class=\"wp-image-2280 not-transparent\" srcset=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/9-chatgpt5-denab.webp 763w, https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/9-chatgpt5-denab-300x237.webp 300w\" sizes=\"auto, (max-width: 763px) 100vw, 763px\" \/><\/figure>\n\n\n\n<p><em><strong>Final Heatmap Visual for Late Delivery Risk Diagnostics:<\/strong> We can observe that some regions shipping via First Class have most of their orders arriving late (deep orange cells), whereas Standard Class deliveries in the USCA region are almost all on time (yellow coloured cell with a very low late percentage). Such insights direct management attention to the worst-performing combinations.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading has-h-3-font-size\">Using GPT-5 to Improve the Spec: AI as a Co-Developer<\/h2>\n\n\n\n<p>It&#8217;s worth thinking about how GPT-5 helped with this process of development. Instead of authoring the Vega-Lite standard all by hand, we used GPT-5 as a co-developer to swiftly write code snippets based on our directions. This experience teaches us a few things about how to use AI in BI development:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Prompt quality matters:<\/strong> The detail and clarity of your prompt largely determine the quality of the AI\u2019s output. We spent time crafting a thorough prompt with field names, goals, and even examples. That initial effort paid off by yielding a mostly correct spec structure on the first try. Vague instructions would likely have produced a useless result, requiring far more back-and-forth.<\/li>\n\n\n\n<li><strong>Iterative refinement is key:<\/strong> The first output from GPT-5 was not perfect. We had to guide the AI step-by-step \u2013 identifying issues (like the missing percentage calculation). This iterative loop is essential; GPT-5 doesn\u2019t inherently know our exact needs, but it responds well to specific corrections.<\/li>\n<\/ul>\n\n\n\n<p>To learn more about ChatGPT and Power BI, check out our course here:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.dynamicwebtraining.com.au\/chatgpt-training-courses\">ChatGPT Essentials for Data Analytics<\/a> and <a href=\"https:\/\/www.dynamicwebtraining.com.au\/power-bi-training-courses\">Power BI Training<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading has-h-3-font-size\">Conclusion<\/h2>\n\n\n\n<p>Using GPT-5 and Deneb, we built a custom Power BI visual that reveals late delivery patterns across shipping modes and regions. This technical walkthrough covered the entire process \u2013 from defining the problem and sketching a wireframe, to prompt engineering with GPT-5, to iteratively developing the Vega-Lite spec, implementing it in Power BI, and analysing the results. The outcome is a powerful diagnostic tool for supply chain analysts: an interactive heatmap that immediately highlights where on-time delivery performance is lagging.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Timely delivery is a critical metric in supply chain operations; late shipments can affect customer satisfaction, loyalty and impact revenue. Identifying and reducing late deliveries can significantly boost customer retention and reduce acquisition costs.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2175],"tags":[],"class_list":["post-2270","post","type-post","status-publish","format-standard","hentry","category-chatgpt"],"yoast_head":"<title>Learn how to use GPT-5 and Deneb for Custom Power BI Visuals<\/title>\n<meta name=\"description\" content=\"View and Share Dynamic Web Training Blog Archives. This is a great source of articles and posts on Computer and IT training, tutorials and insights\" \/>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn how to use GPT-5 and Deneb for Custom Power BI Visuals\" \/>\n<meta property=\"og:description\" content=\"Learn how to use Deneb (a custom Power BI visual that leverages Vega-Lite) with GPT-5 to build a specification via prompts for supply chain delay diagnostics\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals\" \/>\n<meta property=\"og:site_name\" content=\"Dynamic Web Training Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DynamicWebTraining\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/DynamicWebTraining\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-10-14T05:41:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-25T04:59:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/1-chatgpt5-denab-1024x683.webp\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@dynamicwebtrain\" \/>\n<meta name=\"twitter:site\" content=\"@dynamicwebtrain\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#organization\",\"name\":\"Dynamic Web Training\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/\",\"sameAs\":[\"https:\/\/www.facebook.com\/DynamicWebTraining\/\",\"https:\/\/www.linkedin.com\/company\/dynamic-web-training\",\"https:\/\/twitter.com\/dynamicwebtrain\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2016\/02\/logo.png\",\"width\":361,\"height\":109,\"caption\":\"Dynamic Web Training\"},\"image\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#website\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/\",\"name\":\"Dynamic Web Training Blog\",\"description\":\"The Ultimate Training Experience.\",\"publisher\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-content\/uploads\/2025\/10\/1-chatgpt5-denab-1024x683.webp\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#webpage\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals\",\"name\":\"Learn how to use GPT-5 and Deneb for Custom Power BI Visuals\",\"isPartOf\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#primaryimage\"},\"datePublished\":\"2025-10-14T05:41:08+00:00\",\"dateModified\":\"2026-03-25T04:59:08+00:00\",\"description\":\"Learn how to use Deneb (a custom Power BI visual that leverages Vega-Lite) with GPT-5 to build a specification via prompts for supply chain delay diagnostics\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\",\"name\":\"Training Blog\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/category\/training\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/category\/training\",\"name\":\"Training\"}},{\"@type\":\"ListItem\",\"position\":3,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/category\/training\/chatgpt\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/category\/training\/chatgpt\",\"name\":\"ChatGPT\"}},{\"@type\":\"ListItem\",\"position\":4,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals\",\"url\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals\",\"name\":\"How to use GPT-5 and Deneb for Custom Power BI Visuals: Late Delivery Risk Diagnostics\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#webpage\"},\"author\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#\/schema\/person\/c94653aed4a6decc8e357af0a1082233\"},\"headline\":\"How to use GPT-5 and Deneb for Custom Power BI Visuals: Late Delivery Risk Diagnostics\",\"datePublished\":\"2025-10-14T05:41:08+00:00\",\"dateModified\":\"2026-03-25T04:59:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#webpage\"},\"publisher\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/using-chatgpt-5-and-denab-for-custom-power-bi-visuals#primaryimage\"},\"articleSection\":\"ChatGPT\",\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#\/schema\/person\/c94653aed4a6decc8e357af0a1082233\",\"name\":\"Dynamic Web Training\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.dynamicwebtraining.com.au\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0a14e92e62ad4eee0843f5cf7da3a00e1df4c9763922d4d20ba3ed2402a6896d?s=96&d=mm&r=g\",\"caption\":\"Dynamic Web Training\"},\"description\":\"Dynamic Web Training is Australia's leading provider of instructor led software training. We offer training courses in Adobe, Web Design, Graphic Design, Photoshop, InDesign, Dreamweaver and many more.\",\"sameAs\":[\"https:\/\/www.facebook.com\/DynamicWebTraining\/\",\"https:\/\/www.linkedin.com\/company\/dynamic-web-training\",\"https:\/\/twitter.com\/dynamicwebtrain\"]}]}<\/script>","_links":{"self":[{"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/posts\/2270","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/comments?post=2270"}],"version-history":[{"count":3,"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/posts\/2270\/revisions"}],"predecessor-version":[{"id":2399,"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/posts\/2270\/revisions\/2399"}],"wp:attachment":[{"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/media?parent=2270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/categories?post=2270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dynamicwebtraining.com.au\/blog\/wp-json\/wp\/v2\/tags?post=2270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}