<?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: Conditional formatting for matrix column headers based on closed month in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Conditional-formatting-for-matrix-column-headers-based-on-closed/m-p/5219257#M13186</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1553502"&gt;@RAYAN123&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, Power BI does not support conditional formatting for matrix column headers.&amp;nbsp;Conditional formatting can only be applied to values within the visual, not to row or column headers.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;If your requirement is to dynamically color the month header itself, you can use the &lt;STRONG&gt;Deneb custom visual&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have provided below &lt;STRONG&gt;Deneb custom visual e&lt;/STRONG&gt;&lt;STRONG&gt;xample using&amp;nbsp;Sample Data - Time Sample&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rupa01_0-1781862514381.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352879i1FA0BC0B591296E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rupa01_0-1781862514381.png" alt="Rupa01_0-1781862514381.png" /&gt;&lt;/span&gt;&lt;P&gt;1. Create a custom column&amp;nbsp;&lt;STRONG&gt;MonthHeaderColor&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;MonthHeaderColor = 
IF(
    'Time Sample'[IsClosedMonth] = TRUE(),
    "#70AD47",   -- Green
    "#A6A6A6"    -- Grey
)&lt;/LI-CODE&gt;&lt;P&gt;2. Add Month, MonthNo, IsClosedMonth and MonthHeaderColor to the Values in Deneb Visual.&lt;/P&gt;&lt;P&gt;3. Edit Visual and select &lt;STRONG&gt;Vega-Lite&lt;/STRONG&gt; (empty).&lt;/P&gt;&lt;P&gt;4. Add below to the Specification section and Run.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": { "name": "dataset" },

  "transform": [
    {
      "calculate": "'Header'",
      "as": "HeaderRow"
    }
  ],

  "width": { "step": 70 },
  "height": 45,

  "layer": [
    {
      "mark": {
        "type": "rect",
        "stroke": "white",
        "strokeWidth": 1,
        "cornerRadius": 2
      },
      "encoding": {
        "x": {
          "field": "Month",
          "type": "ordinal",
          "sort": { "field": "MonthNo", "order": "ascending" },
          "axis": null
        },
        "y": {
          "field": "HeaderRow",
          "type": "nominal",
          "axis": null
        },
        "color": {
          "field": "MonthHeaderColor",
          "type": "nominal",
          "scale": null,
          "legend": null
        },
        "tooltip": [
          { "field": "Month", "type": "nominal", "title": "Month" },
          { "field": "IsClosedMonth", "type": "nominal", "title": "Closed?" }
        ]
      }
    },
    {
      "mark": {
        "type": "text",
        "align": "center",
        "baseline": "middle",
        "fontSize": 13,
        "fontWeight": "bold",
        "color": "white"
      },
      "encoding": {
        "x": {
          "field": "Month",
          "type": "ordinal",
          "sort": { "field": "MonthNo", "order": "ascending" }
        },
        "y": {
          "field": "HeaderRow",
          "type": "nominal"
        },
        "text": {
          "field": "Month",
          "type": "nominal"
        }
      }
    }
  ],

  "config": {
    "view": {
      "stroke": null
    }
  }
}&lt;/LI-CODE&gt;&lt;P&gt;5. Result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rupa01_1-1781863094984.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352880i22FF23CF777702F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rupa01_1-1781863094984.png" alt="Rupa01_1-1781863094984.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2" color="#000000"&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt;&amp;nbsp;Helpful?&amp;nbsp;Give a Kudos &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; — keep the community growing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2" color="#000000"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;&amp;nbsp;Solved your issue?&amp;nbsp;Mark as Solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; — help others find it faster&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#6f2dbd"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Best regards,&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#6f2dbd"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Rupasree Achari | BI &amp;amp; Fabric Analytics Engineer&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 28 Jun 2026 18:08:33 GMT</pubDate>
    <dc:creator>Rupa01</dc:creator>
    <dc:date>2026-06-28T18:08:33Z</dc:date>
    <item>
      <title>Conditional formatting for matrix column headers based on closed month</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Conditional-formatting-for-matrix-column-headers-based-on-closed/m-p/5213859#M13184</link>
      <description>&lt;DIV&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am working with a Power BI matrix&amp;nbsp;where I have months (January–December) displayed as column headers, as shown in the screenshot. no value will display, only the column&lt;/P&gt;&lt;P&gt;Kindly ask for below request solution&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Dynamically change the background color of the column headers&lt;/LI&gt;&lt;LI&gt;If a month is financially closed → show green&lt;/LI&gt;&lt;LI&gt;If a month is still open → show grey&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I have a DAX in my model (e.g., a measure or flag indicating whether a month is closed):&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Closed Month Flag =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Time'&lt;/SPAN&gt;&lt;SPAN&gt;[IsClosedMonth]&lt;/SPAN&gt;&lt;SPAN&gt;) = &lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;so the challenge is only related to applying the formatting to the headers.&lt;BR /&gt;&lt;BR /&gt;Thanks for support!&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-06-18 095130.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352728i414293C68B80430F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-06-18 095130.png" alt="Screenshot 2026-06-18 095130.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jun 2026 07:52:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Conditional-formatting-for-matrix-column-headers-based-on-closed/m-p/5213859#M13184</guid>
      <dc:creator>RAYAN123</dc:creator>
      <dc:date>2026-06-18T07:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting for matrix column headers based on closed month</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Conditional-formatting-for-matrix-column-headers-based-on-closed/m-p/5219257#M13186</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1553502"&gt;@RAYAN123&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, Power BI does not support conditional formatting for matrix column headers.&amp;nbsp;Conditional formatting can only be applied to values within the visual, not to row or column headers.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;If your requirement is to dynamically color the month header itself, you can use the &lt;STRONG&gt;Deneb custom visual&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have provided below &lt;STRONG&gt;Deneb custom visual e&lt;/STRONG&gt;&lt;STRONG&gt;xample using&amp;nbsp;Sample Data - Time Sample&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rupa01_0-1781862514381.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352879i1FA0BC0B591296E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rupa01_0-1781862514381.png" alt="Rupa01_0-1781862514381.png" /&gt;&lt;/span&gt;&lt;P&gt;1. Create a custom column&amp;nbsp;&lt;STRONG&gt;MonthHeaderColor&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;MonthHeaderColor = 
IF(
    'Time Sample'[IsClosedMonth] = TRUE(),
    "#70AD47",   -- Green
    "#A6A6A6"    -- Grey
)&lt;/LI-CODE&gt;&lt;P&gt;2. Add Month, MonthNo, IsClosedMonth and MonthHeaderColor to the Values in Deneb Visual.&lt;/P&gt;&lt;P&gt;3. Edit Visual and select &lt;STRONG&gt;Vega-Lite&lt;/STRONG&gt; (empty).&lt;/P&gt;&lt;P&gt;4. Add below to the Specification section and Run.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": { "name": "dataset" },

  "transform": [
    {
      "calculate": "'Header'",
      "as": "HeaderRow"
    }
  ],

  "width": { "step": 70 },
  "height": 45,

  "layer": [
    {
      "mark": {
        "type": "rect",
        "stroke": "white",
        "strokeWidth": 1,
        "cornerRadius": 2
      },
      "encoding": {
        "x": {
          "field": "Month",
          "type": "ordinal",
          "sort": { "field": "MonthNo", "order": "ascending" },
          "axis": null
        },
        "y": {
          "field": "HeaderRow",
          "type": "nominal",
          "axis": null
        },
        "color": {
          "field": "MonthHeaderColor",
          "type": "nominal",
          "scale": null,
          "legend": null
        },
        "tooltip": [
          { "field": "Month", "type": "nominal", "title": "Month" },
          { "field": "IsClosedMonth", "type": "nominal", "title": "Closed?" }
        ]
      }
    },
    {
      "mark": {
        "type": "text",
        "align": "center",
        "baseline": "middle",
        "fontSize": 13,
        "fontWeight": "bold",
        "color": "white"
      },
      "encoding": {
        "x": {
          "field": "Month",
          "type": "ordinal",
          "sort": { "field": "MonthNo", "order": "ascending" }
        },
        "y": {
          "field": "HeaderRow",
          "type": "nominal"
        },
        "text": {
          "field": "Month",
          "type": "nominal"
        }
      }
    }
  ],

  "config": {
    "view": {
      "stroke": null
    }
  }
}&lt;/LI-CODE&gt;&lt;P&gt;5. Result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rupa01_1-1781863094984.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1352880i22FF23CF777702F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rupa01_1-1781863094984.png" alt="Rupa01_1-1781863094984.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2" color="#000000"&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt;&amp;nbsp;Helpful?&amp;nbsp;Give a Kudos &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; — keep the community growing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2" color="#000000"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt;&amp;nbsp;Solved your issue?&amp;nbsp;Mark as Solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; — help others find it faster&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#6f2dbd"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Best regards,&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#6f2dbd"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Rupasree Achari | BI &amp;amp; Fabric Analytics Engineer&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Jun 2026 18:08:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Conditional-formatting-for-matrix-column-headers-based-on-closed/m-p/5219257#M13186</guid>
      <dc:creator>Rupa01</dc:creator>
      <dc:date>2026-06-28T18:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting for matrix column headers based on closed month</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Conditional-formatting-for-matrix-column-headers-based-on-closed/m-p/5238990#M13196</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1553502"&gt;@RAYAN123&lt;/a&gt;,&amp;nbsp;&lt;SPAN&gt;did you get a chance to review the solution provided?&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;If it helped resolve your issue, please consider marking it as &lt;EM&gt;Accepted Solution&lt;/EM&gt; so it can benefit others in the community as well.&lt;/P&gt;&lt;P&gt;Let me know if you need any further assistance! &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Jun 2026 11:23:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Conditional-formatting-for-matrix-column-headers-based-on-closed/m-p/5238990#M13196</guid>
      <dc:creator>Rupa01</dc:creator>
      <dc:date>2026-06-26T11:23:19Z</dc:date>
    </item>
  </channel>
</rss>

