<?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 doesn't work in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412263#M175229</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="496168" data-lia-user-login="alks_skla_f" class="lia-mention lia-mention-user"&gt;alks_skla_f&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;Here are couple of screenshots, you should be good with the measure,&amp;nbsp;&lt;BR /&gt;But as&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;mentioned, Check whether your CY and PY values are right(Numeric Formart).&amp;nbsp;&lt;BR /&gt;If they return integer or numeric format, you should be good to achive this color formatting.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Punith&lt;/P&gt;</description>
    <pubDate>Sat, 15 Feb 2025 20:33:51 GMT</pubDate>
    <dc:creator>Punithurs</dc:creator>
    <dc:date>2025-02-15T20:33:51Z</dc:date>
    <item>
      <title>Conditional formatting doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412191#M175226</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;I have a card visualisation which shows a number (I checked that this is a number because I can perform different calculations with the result. My task is to color number inside card base on conditions.&lt;BR /&gt;I have a mesure which helps me to set a color:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Absolute_difference_CY_and_PY_color = 
    IF(
        [CY_current_month_total_num_patient] - [PY_current_month_total_num_patient] &amp;lt; 0,
        "#EE2000",  // Red for negative
        IF(
            [CY_current_month_total_num_patient] - [PY_current_month_total_num_patient] = 0,
            "#000000",  // Black for zero
            "#04FF00"   // Green for positive
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;After I set a conditional formatting: Callout values -&amp;gt; Series All (I don't know what this means) -&amp;gt; Color -&amp;gt; Format syle: Field Value -&amp;gt; What field should we base on:&amp;nbsp;&lt;SPAN&gt;Absolute_difference_CY_and_PY_color&lt;BR /&gt;This is doesn't work. Where is my mistake, please?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2025 14:54:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412191#M175226</guid>
      <dc:creator>alks_skla_f</dc:creator>
      <dc:date>2025-02-15T14:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412230#M175228</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="496168" data-lia-user-login="alks_skla_f" class="lia-mention lia-mention-user"&gt;alks_skla_f&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You have taken the right approach, I believe the issue is in the measures involved in CF.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;1.&amp;nbsp; Add the measure "Absolute_difference_CY_and_PY_color" to card visual and check what results you get, it should show the color codes based on the conditions, check the filters applied.&lt;BR /&gt;2. Also, check individual measures to know if they return the expected results.&lt;BR /&gt;[CY_current_month_total_num_patient]&amp;nbsp; and&amp;nbsp; [PY_current_month_total_num_patient]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2025 17:55:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412230#M175228</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2025-02-15T17:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412263#M175229</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="496168" data-lia-user-login="alks_skla_f" class="lia-mention lia-mention-user"&gt;alks_skla_f&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;Here are couple of screenshots, you should be good with the measure,&amp;nbsp;&lt;BR /&gt;But as&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;mentioned, Check whether your CY and PY values are right(Numeric Formart).&amp;nbsp;&lt;BR /&gt;If they return integer or numeric format, you should be good to achive this color formatting.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Punith&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2025 20:33:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412263#M175229</guid>
      <dc:creator>Punithurs</dc:creator>
      <dc:date>2025-02-15T20:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412879#M175252</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="496168" data-lia-user-login="alks_skla_f" class="lia-mention lia-mention-user"&gt;alks_skla_f&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've simply modelled some data that I hope will solve your problem.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure Color = SWITCH(TRUE(),
[Current]-[Previous]&amp;lt;0,"#EE2000",
[Current]-[Previous]=0,"#000000",
"#04FF00")&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Displayed in the card.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Check to see if you've added conditional formatting in the right place.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 02:51:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-doesn-t-work/m-p/4412879#M175252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-17T02:51:18Z</dc:date>
    </item>
  </channel>
</rss>

