<?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 required for 50 columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4659581#M178414</link>
    <description>&lt;P&gt;Hi AnkitKukreja,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Based on my understanding, to avoid the need for manually creating calculated columns for all 40 to 50 columns, you can utilize a more efficient approach with Power Query and a single dynamic measure.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Open Power Query Editor and access it via Transform Data in Power BI Desktop. Add a custom column (for example: HighlightFlag) with a formula such as:&lt;BR /&gt;&lt;BR /&gt;if Text.Contains([Column_Differences], Text.Lower(Text.From([ColumnName]))) then "Highlight" else null&lt;BR /&gt;&lt;BR /&gt;Replace&amp;nbsp; [ColumnName] with the name of the column being evaluated (for instance:ChvTransferPrice). Use Power Query’s Add Column &amp;gt; Custom Column feature and apply this logic across all columns by looping through them.&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Create a Dynamic Measure.&lt;BR /&gt;DynamicHighlight =&lt;BR /&gt;IF(&lt;BR /&gt;SELECTEDVALUE('Table'[HighlightFlag]) = "Highlight",&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;In the table visual, apply conditional formatting to all columns. Navigate to the Format pane &amp;gt; Conditional Formatting &amp;gt; Background Color &amp;gt; Field Value &amp;gt; Select DynamicHighlight. Set the value of 1 to your desired highlight color (for example: yellow) and 0 to the default color.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Test the Visual.Ensure that columns such as ChvTransferPrice are highlighted correctly based on Column_Differences. Save and publish to Microsoft Fabric.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members who may be facing similar queries.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Sat, 19 Apr 2025 19:28:16 GMT</pubDate>
    <dc:creator>v-pnaroju-msft</dc:creator>
    <dc:date>2025-04-19T19:28:16Z</dc:date>
    <item>
      <title>Conditional Formatting required for 50 columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4655673#M178232</link>
      <description>&lt;P&gt;Hi! All,&lt;BR /&gt;My client requires to compare the data as there has been a system update and the logic has been built, I'm stuck on one of the asks to end this project. I have around 40-50 columns in the visual and the requirement is to highlight the value of those colums which are coming up in "Column_Differences". Like ChvTransferPrice for first few rows so only this column should be highlighted that I have in the middle of the table (2nd ss). Similarly for other columns like in 3 row , I need to highlight&amp;nbsp;ChvTransferPrice and PerUnitprice in the table. I have all the columns in the table. Is there any simple approach to achieve this?&amp;nbsp;&lt;BR /&gt;I know a manual approach to add the condition to the conditional formatting, but that requires lot of manual efforts for 70 columns.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 12:12:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4655673#M178232</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2025-04-16T12:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting required for 50 columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4656731#M178285</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="251452" data-lia-user-login="AnkitKukreja" class="lia-mention lia-mention-user"&gt;AnkitKukreja&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you for your inquiry through the Microsoft Fabric Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;To address the issue you are facing, please follow the approach outlined below, which may assist in resolving it:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;For each column you wish to format (for example, ChvTransferPrice), please create a calculated column in the following manner:&lt;BR /&gt;Highlight_ChvTransferPrice =&lt;/P&gt;
&lt;P&gt;IF(SEARCH("ChvTransferPrice", [Column_Differences], 1, 0) &amp;gt; 0, 1, 0)&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Apply Conditional Formatting. Within the visual, navigate to the Format Pane → Cell Elements → Background Color. Choose "Format by" → "Field value" and set it to the corresponding Highlight_ColumnName field.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will aid other community members encountering similar queries.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 17 Apr 2025 05:10:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4656731#M178285</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-04-17T05:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting required for 50 columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4656831#M178293</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="814008" data-lia-user-login="v-pnaroju-msft" class="lia-mention lia-mention-user"&gt;v-pnaroju-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your reply, My ask is do I need to do this for all the columns (40-50) that I have? Or is there any shortcut to achieve this? And what logic I can use for all the columns?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 13:32:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4656831#M178293</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2025-04-17T13:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting required for 50 columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4659581#M178414</link>
      <description>&lt;P&gt;Hi AnkitKukreja,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Based on my understanding, to avoid the need for manually creating calculated columns for all 40 to 50 columns, you can utilize a more efficient approach with Power Query and a single dynamic measure.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Open Power Query Editor and access it via Transform Data in Power BI Desktop. Add a custom column (for example: HighlightFlag) with a formula such as:&lt;BR /&gt;&lt;BR /&gt;if Text.Contains([Column_Differences], Text.Lower(Text.From([ColumnName]))) then "Highlight" else null&lt;BR /&gt;&lt;BR /&gt;Replace&amp;nbsp; [ColumnName] with the name of the column being evaluated (for instance:ChvTransferPrice). Use Power Query’s Add Column &amp;gt; Custom Column feature and apply this logic across all columns by looping through them.&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Create a Dynamic Measure.&lt;BR /&gt;DynamicHighlight =&lt;BR /&gt;IF(&lt;BR /&gt;SELECTEDVALUE('Table'[HighlightFlag]) = "Highlight",&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;In the table visual, apply conditional formatting to all columns. Navigate to the Format pane &amp;gt; Conditional Formatting &amp;gt; Background Color &amp;gt; Field Value &amp;gt; Select DynamicHighlight. Set the value of 1 to your desired highlight color (for example: yellow) and 0 to the default color.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Test the Visual.Ensure that columns such as ChvTransferPrice are highlighted correctly based on Column_Differences. Save and publish to Microsoft Fabric.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members who may be facing similar queries.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Sat, 19 Apr 2025 19:28:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-required-for-50-columns/m-p/4659581#M178414</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-04-19T19:28:16Z</dc:date>
    </item>
  </channel>
</rss>

