<?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: How do i change card data value color in range by DAX measure? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-i-change-card-data-value-color-in-range-by-DAX-measure/m-p/2624882#M76614</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="408115" data-lia-user-login="ngoswami" class="lia-mention lia-mention-user"&gt;ngoswami&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;In your measure,&amp;nbsp;Any value will satisfy the first two conditions, greater than 0 or less than 0.01, so it always returns green. If your desired result is :&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;0&amp;lt;Value&amp;lt;0.01 then green;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-0.01&amp;lt;Value&amp;lt;0 then red;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Value=0 then black.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Then here's my solution.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
IF (
    'Variance Selection'[Lead Variance %] &amp;gt; 0
        &amp;amp;&amp;amp; 'Variance Selection'[Lead Variance %] &amp;lt; 0.01,
    "#2DD224",
    IF (
        'Variance Selection'[Lead Variance %] &amp;gt; -0.01
            &amp;amp;&amp;amp; 'Variance Selection'[Lead Variance %] &amp;lt; 0,
        "#D64550",
        IF ( 'Variance Selection'[Lead Variance %] = 0, "#000000" )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Get the correct result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2022 11:25:05 GMT</pubDate>
    <dc:creator>v-yanjiang-msft</dc:creator>
    <dc:date>2022-07-07T11:25:05Z</dc:date>
    <item>
      <title>How do i change card data value color in range by DAX measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-i-change-card-data-value-color-in-range-by-DAX-measure/m-p/2614787#M75932</link>
      <description>&lt;P&gt;I need to change the &lt;STRONG&gt;card data value color&lt;/STRONG&gt; dynamically by a measure that I can use in the&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;fx&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;of that card!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried as below but it always shows green color; (colors need to be changed in range as below)&amp;nbsp; GREEN-RED-BLACK&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;Also would like to add this if condition with above as well:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;IF(ISFILTERED('Variance Visibility'[SelectShowHide]),"","#FFFFFF")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If someone can help it would be great!&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance!!!&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Jul 2022 18:35:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-i-change-card-data-value-color-in-range-by-DAX-measure/m-p/2614787#M75932</guid>
      <dc:creator>ngoswami</dc:creator>
      <dc:date>2022-07-01T18:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do i change card data value color in range by DAX measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-i-change-card-data-value-color-in-range-by-DAX-measure/m-p/2615128#M75956</link>
      <description>&lt;P&gt;The condition is wrong. Instead of IF, please use SWITCH (&lt;A href="https://dax.guide/switch" target="_blank"&gt;https://dax.guide/switch&lt;/A&gt;) and remember that the conditions are &lt;STRONG&gt;evaluated in the sequence you define&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jul 2022 08:18:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-i-change-card-data-value-color-in-range-by-DAX-measure/m-p/2615128#M75956</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-07-02T08:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do i change card data value color in range by DAX measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-i-change-card-data-value-color-in-range-by-DAX-measure/m-p/2624882#M76614</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="408115" data-lia-user-login="ngoswami" class="lia-mention lia-mention-user"&gt;ngoswami&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;In your measure,&amp;nbsp;Any value will satisfy the first two conditions, greater than 0 or less than 0.01, so it always returns green. If your desired result is :&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;0&amp;lt;Value&amp;lt;0.01 then green;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;-0.01&amp;lt;Value&amp;lt;0 then red;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Value=0 then black.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Then here's my solution.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
IF (
    'Variance Selection'[Lead Variance %] &amp;gt; 0
        &amp;amp;&amp;amp; 'Variance Selection'[Lead Variance %] &amp;lt; 0.01,
    "#2DD224",
    IF (
        'Variance Selection'[Lead Variance %] &amp;gt; -0.01
            &amp;amp;&amp;amp; 'Variance Selection'[Lead Variance %] &amp;lt; 0,
        "#D64550",
        IF ( 'Variance Selection'[Lead Variance %] = 0, "#000000" )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Get the correct result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 11:25:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-i-change-card-data-value-color-in-range-by-DAX-measure/m-p/2624882#M76614</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-07-07T11:25:05Z</dc:date>
    </item>
  </channel>
</rss>

