<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Make a clustered bar chart with conditional formatted leged in Deneb. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4865672#M63683</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Could you please confirm if you’ve tried the suggestion from my earlier reply?&lt;/P&gt;
&lt;P&gt;If the issue still persists, kindly share:&lt;/P&gt;
&lt;UL dir="auto"&gt;
&lt;LI&gt;A screenshot of your Deneb field wells.&lt;/LI&gt;
&lt;LI&gt;Your exact column name.&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Tue, 04 Nov 2025 07:06:57 GMT</pubDate>
    <dc:creator>v-ssriganesh</dc:creator>
    <dc:date>2025-11-04T07:06:57Z</dc:date>
    <item>
      <title>Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4857509#M63534</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to use Deneb as my chart in ordet to replace clustered bar chart with legend colors.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For bar chart without legend I am using Dax Measure like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Color by Rank = 
VAR r = [Rank (Current Axis)]
RETURN
SWITCH (
    TRUE(),
    ISBLANK ( r ) || r &amp;gt; 5, "#B3B3B3",
    r = 1, "#E81123",
    r = 2, "#107C10",
    r = 3, "#0078D4",
    r = 4, "#FFB900",
    r = 5, "#8E8CD8"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power bi limitation is that you can not use measure and condtional format it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_0-1761291773124.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1305264iC095C27415813096/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_0-1761291773124.png" alt="jaryszek_0-1761291773124.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How to make this in Deneb?&amp;nbsp;&lt;BR /&gt;Anyone did this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My bar chart is here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/14lpEWK-MQ6JMU5_15WVh8Gv22AiGvdpR/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/14lpEWK-MQ6JMU5_15WVh8Gv22AiGvdpR/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Will be extremely grateful for help,&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 07:44:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4857509#M63534</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-10-24T07:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4857576#M63535</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;BR /&gt;Thank you for posting your query in the Microsoft Fabric Community Forum. Here’s how you can achieve this in Deneb:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Prepare your data with a “Rank” field that categorizes each bar (e.g: 1, 2, 3, 4, 5) and In your Deneb visual’s Vega-Lite JSON, set up a color scale that directly relates each rank value to a specific hex color. The legend will reflect these specific assignments.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Example json code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;"color": {
  "field": "Rank",
  "type": "nominal",
  "scale": {
    "domain": [1, 2, 3, 4, 5, "Others"],
    "range": ["#E81123", "#107C10", "#0078D4", "#FFB900", "#8E8CD8", "#B3B3B3"]
  },
  "legend": {
    "title": "Rank",
    "labelExpr": "datum.value == 'Others' ? 'Others' : 'Rank ' + datum.value"
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Please give it a try and let me know if you encounter any issues.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Ganesh Singamshetty.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 09:16:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4857576#M63535</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-10-24T09:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4857858#M63537</link>
      <description>&lt;P&gt;Thank you very much,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;i tried with :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {"name": "dataset"},
  "transform": [
    {
      "calculate": "(datum['Rank (Current Axis)'] == null || datum['Rank (Current Axis)'] &amp;gt; 5) ? 'Others' : toString(datum['Rank (Current Axis)'])",
      "as": "RankBucket"
    }
  ],
  "mark": {"type": "bar", "tooltip": true},
  "encoding": {
    "x": {
      "field": "Date",
      "type": "temporal",
      "timeUnit": "yearmonthdate",
      "axis": {"labelAngle": -40, "title": null}
    },
    "xOffset": {
      "field": "MeterCategory",
      "type": "nominal",
      "title": null
    },
    "y": {
      "field": "Sum of CostInBillingCurrency",
      "type": "quantitative",
      "aggregate": "sum",
      "axis": {"title": null}
    },
    "color": {
      "field": "RankBucket",
      "type": "nominal",
      "scale": {
        "domain": ["1","2","3","4","5","Others"],
        "range": ["#E81123","#107C10","#0078D4","#FFB900","#8E8CD8","#B3B3B3"]
      },
      "legend": {
        "title": "Rank",
        "labelExpr": "datum.value === 'Others' ? 'Others' : 'Rank ' + datum.value",
        "orient": "right"
      }
    },
    "order": {"field": "MeterCategory"}
  },
  "config": {
    "view": {"stroke": null},
    "axisY": {"grid": true},
    "bar": {"size": 10}
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;but have no idea how to make this working.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can i use dynamic color range from power bi measure instead of this ?:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"color": {
  "field": "Rank",
  "type": "nominal",
  "scale": {
    "domain": [1, 2, 3, 4, 5, "Others"],
    "range": ["#E81123", "#107C10", "#0078D4", "#FFB900", "#8E8CD8", "#B3B3B3"]
  },&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_0-1761314026636.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1305348i1DB061FFAF8048AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_0-1761314026636.png" alt="jaryszek_0-1761314026636.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best wishes,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 13:53:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4857858#M63537</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-10-24T13:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4860163#M63570</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;BR /&gt;No, Deneb cannot use a Power BI measure (like [Rank (Current Axis)]) for the color range. Measures are not available in the Deneb dataset only table columns are.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Use Vega-Lite transforms (like aggregate + window) to calculate rank and assign colors dynamically no DAX needed.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ganesh Singamshetty.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 04:32:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4860163#M63570</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-10-28T04:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4863946#M63637</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Nov 2025 08:52:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4863946#M63637</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-11-01T08:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4864722#M63654</link>
      <description>&lt;P&gt;Hello, nope code is not working for me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 08:27:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4864722#M63654</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-11-03T08:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4865672#M63683</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Could you please confirm if you’ve tried the suggestion from my earlier reply?&lt;/P&gt;
&lt;P&gt;If the issue still persists, kindly share:&lt;/P&gt;
&lt;UL dir="auto"&gt;
&lt;LI&gt;A screenshot of your Deneb field wells.&lt;/LI&gt;
&lt;LI&gt;Your exact column name.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 04 Nov 2025 07:06:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4865672#M63683</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-11-04T07:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4866449#M63697</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can assign a value to a color encoding by using the field operator in a scale's range after specifying the field to use for its domain, e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  ...
  "encoding": {
    ...
    "color": {
      "field": "MeterCategory",
      "scale": {
        "range": {"field": "Color by Rank"}
      },
      ...
    },
    ...
  },
  ...
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_0-1762285905934.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1307484i86E11C7127C01EAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="dmp_0-1762285905934.png" alt="dmp_0-1762285905934.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is also covered in the Vega-Lite documentation, &lt;A href="https://vega.github.io/vega-lite/docs/scale.html#example-setting-color-range-based-on-a-field" target="_self"&gt;with an example available here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Full spec (based on yours above and corrected to work for this case). The visual data set consists of:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Date (x encoding)&lt;/LI&gt;
&lt;LI&gt;Sum of CostInBillingCurrency (y encoding)&lt;/LI&gt;
&lt;LI&gt;MeterCategory (color encoding)&lt;/LI&gt;
&lt;LI&gt;Color by Rank (color range)&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="javascript"&gt;{
  "data": {
    "name": "dataset"
  },
  "mark": {
    "type": "bar",
    "tooltip": true
  },
  "encoding": {
    "x": {
      "field": "Date",
      "type": "temporal",
      "timeUnit": "yearmonthdate",
      "axis": {
        "labelAngle": -40,
        "title": null
      }
    },
    "y": {
      "field": "Sum of CostInBillingCurrency",
      "type": "quantitative",
      "axis": {
        "title": null
      }
    },
    "color": {
      "field": "MeterCategory",
      "scale": {
        "range": {"field": "Color by Rank"}
      },
      "legend": {
        "title": "Rank",
        "labelExpr": "datum.value === 'Others' ? 'Others' : 'Rank ' + datum.value",
        "orient": "right"
      }
    },
    "order": {
      "field": "MeterCategory"
    }
  },
  "config": {
    "view": {
      "stroke": null
    },
    "axisY": {
      "grid": true
    },
    "bar": {
      "size": 10
    }
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've also attached a copy of your workbook, along with this working visual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for using Deneb!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 19:57:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4866449#M63697</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2025-11-04T19:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4866451#M63698</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/882998"&gt;@v-ssriganesh&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://deneb.guide/docs/dataset#:~:text=Internally%2C%20the%20visual%20handles%20its%20dataset%20in%20much%20the%20same%20way%20as%20a%20core%20table%2C%20i.e.%20the%20number%20of%20rows%20in%20the%20dataset%20is%20equivalent%20to%20the%20combination%20of%20all%20unique%20values%20across%20all%20columns%20and%20measures%20added." target="_self"&gt;To clarify, measures absolutely can be used in a Deneb dataset&lt;/A&gt;. Deneb will aggregate measures by all grouping columns, just like a core table visual does. This problem can be solved either internally to the visual spec or using a measure. &lt;A href="https://deneb.guide/docs/dataset#:~:text=Internally%2C%20the%20visual%20handles%20its%20dataset%20in%20much%20the%20same%20way%20as%20a%20core%20table%2C%20i.e.%20the%20number%20of%20rows%20in%20the%20dataset%20is%20equivalent%20to%20the%20combination%20of%20all%20unique%20values%20across%20all%20columns%20and%20measures%20added." target="_self"&gt;I have provided a solution using the OP's desired measure in the visual dataset above&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 20:03:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4866451#M63698</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2025-11-04T20:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4866610#M63702</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;,&lt;BR /&gt;Thanks for sharing your valuable insights.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best Regards,&lt;BR /&gt;Ganesh Singamshetty.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 03:54:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4866610#M63702</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-11-05T03:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Make a clustered bar chart with conditional formatted leged in Deneb.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4866842#M63708</link>
      <description>&lt;P&gt;Wow, you are the boss!!&lt;BR /&gt;&lt;BR /&gt;Thank you so much, really appreciated.&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 09:28:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Make-a-clustered-bar-chart-with-conditional-formatted-leged-in/m-p/4866842#M63708</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-11-05T09:28:10Z</dc:date>
    </item>
  </channel>
</rss>

