<?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: formatting color of measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4033732#M159706</link>
    <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Thank you very much for your cooperation, sacrifice, and detailed explanation, which reflects your high morals.&lt;/P&gt;&lt;P&gt;The solution you provided is correct, but I need to work on each area individually, and I have many areas.&lt;/P&gt;&lt;P&gt;The idea is that I want to work with the zones and the average order time in table chart, and the colors of the average order time should change according to the target for each aree&lt;/P&gt;&lt;P&gt;attached is an example and how we do like that:&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 10 Jul 2024 05:41:10 GMT</pubDate>
    <dc:creator>majid154a</dc:creator>
    <dc:date>2024-07-10T05:41:10Z</dc:date>
    <item>
      <title>formatting color of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4032315#M159500</link>
      <description>&lt;P&gt;Dear Experts,&amp;nbsp;&lt;BR /&gt;in delivery data, having A, B, C &amp;amp; D zones, and total order time measure.&lt;BR /&gt;need formate color of total of order tiime based on target which are different for each zone as bellow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Targers of zones:&lt;BR /&gt;A &amp;lt;= 35 minutes&lt;/P&gt;&lt;P&gt;B&amp;lt;= 30 Mintues&lt;/P&gt;&lt;P&gt;C&amp;lt;= 55 mintues&lt;/P&gt;&lt;P&gt;D &amp;lt;= 40 mintues&lt;/P&gt;&lt;P&gt;if acheived put green, if not put red,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How do that&amp;nbsp; in Power BI. I prefer to do example in power bi&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 09:59:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4032315#M159500</guid>
      <dc:creator>majid154a</dc:creator>
      <dc:date>2024-07-09T09:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: formatting color of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4033547#M159686</link>
      <description>&lt;P&gt;Hi,&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="747248" data-lia-user-login="majid154a" class="lia-mention lia-mention-user"&gt;majid154a&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am glad to help you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you want to formatting color of measure？&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I understand you correctly, then you can refer to my solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First I simply created some data based on what you meant:&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;
&lt;P&gt;Then for the four zones A,B,C,D created the corresponding four Measures to calculate their Tatol order time:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total order time of A = SUM('Table'[A]) 

Total order time of B = SUM('Table'[B]) 

Total order time of C = SUM('Table'[C]) 

Total order time of D = SUM('Table'[D]) &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can directly go to 'Format you visual' to format color, as shown below:&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;
&lt;P&gt;Set your rules for&amp;nbsp;formatting color of measure&amp;nbsp;over here.&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can set the color rules for the different Measures directly from this side and then repeat the above steps.&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;The final result:&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;This is just a simple example, hope it helps you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Fen Ling,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 03:02:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4033547#M159686</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-10T03:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: formatting color of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4033732#M159706</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Thank you very much for your cooperation, sacrifice, and detailed explanation, which reflects your high morals.&lt;/P&gt;&lt;P&gt;The solution you provided is correct, but I need to work on each area individually, and I have many areas.&lt;/P&gt;&lt;P&gt;The idea is that I want to work with the zones and the average order time in table chart, and the colors of the average order time should change according to the target for each aree&lt;/P&gt;&lt;P&gt;attached is an example and how we do like that:&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Jul 2024 05:41:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4033732#M159706</guid>
      <dc:creator>majid154a</dc:creator>
      <dc:date>2024-07-10T05:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: formatting color of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4044083#M160404</link>
      <description>&lt;P&gt;Hi,&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="747248" data-lia-user-login="majid154a" class="lia-mention lia-mention-user"&gt;majid154a&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure if your data is in this form:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If it is, you can refer to this method to achieve your needs.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Create a Measure for labeling the total order time for each Zone:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average total order time =
CALCULATE (
    AVERAGE( 'Table02'[Order_time] ),
    FILTER ( ALL ( Table02 ), 'Table02'[Zones] = MAX ( 'Table02'[Zones] ) )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Create another Measure to determine if the target value is reached:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Color_change =
SWITCH (
    TRUE (),
    SELECTEDVALUE ( Table02[Zones] ) = "A"
        &amp;amp;&amp;amp; [Average total order time] &amp;lt;= 35, 1,
    SELECTEDVALUE ( Table02[Zones] ) = "B"
        &amp;amp;&amp;amp; [Average total order time] &amp;lt;= 30, 1,
    SELECTEDVALUE ( Table02[Zones] ) = "C"
        &amp;amp;&amp;amp; [Average total order time] &amp;lt;= 55, 1,
    SELECTEDVALUE ( Table02[Zones] ) = "D"
        &amp;amp;&amp;amp; [Average total order time] &amp;lt;= 40, 1,
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Finally a background color rule is used to fill in the corresponding results:&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;Result :&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.&lt;BR /&gt;Best Regards,&lt;BR /&gt;Fen Ling,&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 01:58:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formatting-color-of-measure/m-p/4044083#M160404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-25T01:58:04Z</dc:date>
    </item>
  </channel>
</rss>

