<?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: Switch Measure - conditional formatting in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4419817#M175487</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="755889" data-lia-user-login="cn4422" class="lia-mention lia-mention-user"&gt;cn4422&lt;/a&gt;&amp;nbsp;, Not sure but trying separate measure than and use it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;reate Individual Measures for Each Country: Create separate measures for each country that calculate the ratio or value you want to use for conditional formatting.&lt;BR /&gt;G_AT_L_AT_Ratio = DIVIDE([G AT], [L AT], 0)&lt;BR /&gt;G_BE_L_BE_Ratio = DIVIDE([G BE], [L BE], 0)&lt;BR /&gt;G_CH_L_CH_Ratio = DIVIDE([G CH], [L CH], 0)&lt;BR /&gt;Apply Conditional Formatting: Apply conditional formatting to each measure separately in the matrix visual.&lt;/P&gt;
&lt;P&gt;Go to the matrix visual in your Power BI report.&lt;BR /&gt;Click on the dropdown arrow next to the measure you want to format (e.g., G_AT_L_AT_Ratio).&lt;BR /&gt;Select "Conditional formatting" and then "Background color" or "Font color" depending on your preference.&lt;BR /&gt;In the conditional formatting dialog, choose "Field value" and select the corresponding measure (e.g., G_AT_L_AT_Ratio).&lt;BR /&gt;Set the color scale to a three-color gradient and configure the minimum, midpoint, and&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2025 13:36:47 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2025-02-20T13:36:47Z</dc:date>
    <item>
      <title>Switch Measure - conditional formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4417603#M175412</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have several switch-measures in a matrix table, like this example here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;Switch = &lt;/SPAN&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(Countries[Country]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"AT"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;([G AT],[L AT],&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"BE"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;([G BE],[L BE],&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"CH"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;([G CH],[L CH],&lt;/SPAN&gt;&lt;SPAN&gt;0&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;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is it possible to apply conditional formatting with a three-color gradient to each row individually, so that each row (only values, no sum) is evaluated in its own context rather than across all rows?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many thx in advance!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Feb 2025 10:50:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4417603#M175412</guid>
      <dc:creator>cn4422</dc:creator>
      <dc:date>2025-02-19T10:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Switch Measure - conditional formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4417687#M175414</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="755889" data-lia-user-login="cn4422" class="lia-mention lia-mention-user"&gt;cn4422&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a Measure for Conditional Formatting: You need to create a measure that will be used for the conditional formatting. This measure should return a value that can be used to determine the color gradient.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ConditionalFormattingMeasure = &lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;SELECTEDVALUE(Countries[Country]) = "AT", DIVIDE([G AT], [L AT], 0),&lt;BR /&gt;SELECTEDVALUE(Countries[Country]) = "BE", DIVIDE([G BE], [L BE], 0),&lt;BR /&gt;SELECTEDVALUE(Countries[Country]) = "CH", DIVIDE([G CH], [L CH], 0)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Apply Conditional Formatting: Once you have the measure, you can apply conditional formatting to the matrix table.&lt;/P&gt;
&lt;P&gt;Go to the matrix visual in your Power BI report.&lt;BR /&gt;Click on the dropdown arrow next to the measure you want to format.&lt;BR /&gt;Select "Conditional formatting" and then "Background color" or "Font color" depending on your preference.&lt;BR /&gt;In the conditional formatting dialog, choose "Field value" and select the ConditionalFormattingMeasure you created.&lt;BR /&gt;Set the color scale to a three-color gradient and configure the minimum, midpoint, and maximum values as needed.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 11:42:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4417687#M175414</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-02-19T11:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Switch Measure - conditional formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4419683#M175475</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;thanks for your reply and the provided measure and explanation!&lt;/P&gt;&lt;P&gt;The conditional formatting itself works fine.&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;However, it considers all rows from all countries, using the highest and lowest values across all countries as reference points.&lt;/P&gt;&lt;P&gt;What I would like instead is for each row to reference only itself. In this case, we have only two rows—so for AT, the lowest value would be €47.19, and the highest would be €55.58, regardless of the other rows.&lt;/P&gt;&lt;P&gt;Is there a way to apply conditional formatting in this way?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 12:20:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4419683#M175475</guid>
      <dc:creator>cn4422</dc:creator>
      <dc:date>2025-02-20T12:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Switch Measure - conditional formatting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4419817#M175487</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="755889" data-lia-user-login="cn4422" class="lia-mention lia-mention-user"&gt;cn4422&lt;/a&gt;&amp;nbsp;, Not sure but trying separate measure than and use it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;reate Individual Measures for Each Country: Create separate measures for each country that calculate the ratio or value you want to use for conditional formatting.&lt;BR /&gt;G_AT_L_AT_Ratio = DIVIDE([G AT], [L AT], 0)&lt;BR /&gt;G_BE_L_BE_Ratio = DIVIDE([G BE], [L BE], 0)&lt;BR /&gt;G_CH_L_CH_Ratio = DIVIDE([G CH], [L CH], 0)&lt;BR /&gt;Apply Conditional Formatting: Apply conditional formatting to each measure separately in the matrix visual.&lt;/P&gt;
&lt;P&gt;Go to the matrix visual in your Power BI report.&lt;BR /&gt;Click on the dropdown arrow next to the measure you want to format (e.g., G_AT_L_AT_Ratio).&lt;BR /&gt;Select "Conditional formatting" and then "Background color" or "Font color" depending on your preference.&lt;BR /&gt;In the conditional formatting dialog, choose "Field value" and select the corresponding measure (e.g., G_AT_L_AT_Ratio).&lt;BR /&gt;Set the color scale to a three-color gradient and configure the minimum, midpoint, and&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 13:36:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Switch-Measure-conditional-formatting/m-p/4419817#M175487</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-02-20T13:36:47Z</dc:date>
    </item>
  </channel>
</rss>

