<?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 Conditional formatting with DAX in case of SWITCH measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-with-DAX-in-case-of-SWITCH-measure/m-p/3011550#M102121</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a measure which are connected with a period filter. Based on what I am filtering I am able to see the data (e.g. for 1MO or 3MO).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the&amp;nbsp;magnitude of the numbers (positive or negative), I would like to highlight the background of the cells with green or red. The numbers are splitted by region. (e.g. if the 1MO value is negative for Asia the background of the cell should be red, however, if I change the filter for 3MO and the value is positive the color of the cell should change to green).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the view what I would like to change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the original measure.&amp;nbsp;&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;Can you please help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Vanda&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jan 2023 15:17:12 GMT</pubDate>
    <dc:creator>vandavarosi</dc:creator>
    <dc:date>2023-01-10T15:17:12Z</dc:date>
    <item>
      <title>Conditional formatting with DAX in case of SWITCH measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-with-DAX-in-case-of-SWITCH-measure/m-p/3011550#M102121</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a measure which are connected with a period filter. Based on what I am filtering I am able to see the data (e.g. for 1MO or 3MO).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the&amp;nbsp;magnitude of the numbers (positive or negative), I would like to highlight the background of the cells with green or red. The numbers are splitted by region. (e.g. if the 1MO value is negative for Asia the background of the cell should be red, however, if I change the filter for 3MO and the value is positive the color of the cell should change to green).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is the view what I would like to change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the original measure.&amp;nbsp;&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;Can you please help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Vanda&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 15:17:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-with-DAX-in-case-of-SWITCH-measure/m-p/3011550#M102121</guid>
      <dc:creator>vandavarosi</dc:creator>
      <dc:date>2023-01-10T15:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting with DAX in case of SWITCH measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-with-DAX-in-case-of-SWITCH-measure/m-p/3012541#M102197</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="496913" data-lia-user-login="vandavarosi" class="lia-mention lia-mention-user"&gt;vandavarosi&lt;/a&gt; , You can create a color measure that return color based on condition and use that in conditional formatting using field value option &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;examples&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Color = Switch( True() ,&lt;BR /&gt;Max(Table[Status]) &amp;lt; 200 ,&lt;BR /&gt;Switch(true(),&lt;BR /&gt;[ERB] = .25 , "Orange" ,&lt;BR /&gt;"Red " &lt;BR /&gt;) ,&lt;BR /&gt;Max(Table[Status]) &amp;lt; 500 ,&lt;BR /&gt;Switch(true(),&lt;BR /&gt;[ERB] = .25 , "Orange" ,&lt;BR /&gt;"Red " &lt;BR /&gt;) ,&lt;BR /&gt;Switch(true(),&lt;BR /&gt;[ERB] = .25 , "Orange" ,&lt;BR /&gt;"Red " &lt;BR /&gt;) &lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Colour = &lt;BR /&gt;SWITCH(TRUE(),&lt;BR /&gt;'Table'[Date] &amp;lt; TODAY(), "red",&lt;BR /&gt;'Table'[Date] = TODAY(), "orange",&lt;BR /&gt;"green")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;color Measure = &lt;BR /&gt;Switch(True() ,&lt;BR /&gt;max(Table[ID]) in {10,20,30} ,"Red",&lt;BR /&gt;max(Table[ID]) in {5,15,25} ,"Blue",&lt;BR /&gt;"White"&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to do conditional formatting by measure and apply it on pie? &lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=RqBb5eBf_I4&amp;amp;list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L" target="_blank"&gt;https://www.youtube.com/watch?v=RqBb5eBf_I4&amp;amp;list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pane-66e0afcb15f3" target="_blank"&gt;https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pane-66e0afcb15f3&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 02:07:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-with-DAX-in-case-of-SWITCH-measure/m-p/3012541#M102197</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-11T02:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting with DAX in case of SWITCH measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-with-DAX-in-case-of-SWITCH-measure/m-p/4403774#M174819</link>
      <description>&lt;P&gt;The Color field for conditional formatting requires a STRING. Even if you set each measure and your SWITCH() measure to Text, it will still not work.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;TO FIX: You can assure each measure is a STRING by wrapping each measure in CONVERT([measure], STRING)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;vs LY slicer =&lt;BR /&gt;IF(&lt;BR /&gt;ISCROSSFILTERED('MS Period slicer'[MS period name]),&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "1 MO view", CONVERT([1MO vs LY in bps], STRING),&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "3 MO view", CONVERT([3MO vs LY in bps], STRING),&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "6 MO view", CONVERT([6MO vs LY in bps], STRING),&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "12 MO view", CONVERT([12MO vs LY in bps], STRING),&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "FYTD view", CONVERT([FYTD MO vs LY in bps], STRING),&lt;BR /&gt;BLANK()&lt;BR /&gt;),&lt;BR /&gt;BLANK()&lt;BR /&gt;)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can verify that text-only works, and you can load thiss measure into the Color conditional format, with random colors like this:&lt;BR /&gt;&lt;BR /&gt;vs LY slicer =&lt;BR /&gt;IF(&lt;BR /&gt;ISCROSSFILTERED('MS Period slicer'[MS period name]),&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "1 MO view", "#FF5733", // Red-Orange&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "3 MO view", "#33FF57", // Green&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "6 MO view", "#3357FF", // Blue&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "12 MO view", "#F0FF33", // Yellow&lt;BR /&gt;VALUES('MS Period slicer'[MS period name]) = "FYTD view", "#FF33F0", // Pink&lt;BR /&gt;"#808080" // Default Gray&lt;BR /&gt;),&lt;BR /&gt;"#808080"&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 22:34:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-with-DAX-in-case-of-SWITCH-measure/m-p/4403774#M174819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-10T22:34:38Z</dc:date>
    </item>
  </channel>
</rss>

