<?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 in Matrix in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2406062#M63166</link>
    <description>&lt;P&gt;This works, thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 21 Mar 2022 08:17:56 GMT</pubDate>
    <dc:creator>KHMJ</dc:creator>
    <dc:date>2022-03-21T08:17:56Z</dc:date>
    <item>
      <title>Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2402624#M62956</link>
      <description>&lt;P&gt;Hi! I'm trying to do some conditional formatting on my matrix visual. There are a few conditions that I need to have:&lt;/P&gt;&lt;P&gt;1) If value &amp;gt; 100%, colour red&lt;/P&gt;&lt;P&gt;2) Based on the above, all months before the latest month that is red needs to be red too&lt;/P&gt;&lt;P&gt;3) Everything else that is in the first 2 months to be yellow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By creating a measure, I could accomplish 1) and 3), but I need some tips on how to accomplish 2).&lt;/P&gt;&lt;P&gt;Below is a sample data, of which i need the white cells outlined in red to be shaded in red.&lt;/P&gt;&lt;P&gt;Thanks!&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;</description>
      <pubDate>Fri, 18 Mar 2022 08:29:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2402624#M62956</guid>
      <dc:creator>KHMJ</dc:creator>
      <dc:date>2022-03-18T08:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2402815#M62968</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="368769" data-lia-user-login="KHMJ" class="lia-mention lia-mention-user"&gt;KHMJ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it depends on the current measure. We meed to modify the existing one not to add a new measure. Can share the code that you are using right now?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 09:47:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2402815#M62968</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-18T09:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2403587#M63020</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I have a month index that is tied to the months now (i.e. 2022-03 has index 1, 2022-04 has index 2, 2022-05 has index 3 etc).&lt;/P&gt;&lt;P&gt;My current measure for the formatting is:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Conditional Formatting = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[% Load]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"#ff7276"&lt;/SPAN&gt;&lt;SPAN&gt;, (&lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Table[Month Index]&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;1&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;||&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Table[Month Index]&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;"#ffa500"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"#f8f8ff"&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 18 Mar 2022 15:17:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2403587#M63020</guid>
      <dc:creator>KHMJ</dc:creator>
      <dc:date>2022-03-18T15:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2404351#M63078</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="368769" data-lia-user-login="KHMJ" class="lia-mention lia-mention-user"&gt;KHMJ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may try the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Conditional Formatting =
VAR CurrentMonth =
    SELECTEDVALUE ( Table[Month Index] )
VAR LastMonthAbove100 =
    CALCULATE (
        MAX ( Table[Month Index] ),
        [% Load] &amp;gt; 1,
        REMOVEFILTERS ( Table[Month Index] )
    )
RETURN
    IF (
        CurrentMonth &amp;lt;= LastMonthAbove100,
        "#ff7276",
        IF ( CurrentMonth = 1 || CurrentMonth = 2, "#ffa500", "#f8f8ff" )
    )&lt;/LI-CODE&gt;&lt;P&gt;Or&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Conditional Formatting =
VAR CurrentMonth =
    SELECTEDVALUE ( Table[Month Index] )
VAR LastMonthAbove100 =
    CALCULATE (
        MAX ( Table[Month Index] ),
        [% Load] &amp;gt; 1,
        REMOVEFILTERS ( Table[Month Index] )
    )
RETURN
    IF (
        CurrentMonth &amp;lt;= LastMonthAbove100,
        "#ff7276",
        IF ( CurrentMonth IN { 1, 2 }, "#ffa500", "#f8f8ff" )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2022 10:15:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2404351#M63078</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-19T10:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2404986#M63105</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;! I tried and got the following error message though..&lt;/P&gt;&lt;P&gt;"A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed."&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 12:36:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2404986#M63105</guid>
      <dc:creator>KHMJ</dc:creator>
      <dc:date>2022-03-20T12:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2405079#M63117</link>
      <description>&lt;P&gt;Ho&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="368769" data-lia-user-login="KHMJ" class="lia-mention lia-mention-user"&gt;KHMJ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you please share some insensitive sample data to work with? What is the code for % Load?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 16:04:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2405079#M63117</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-20T16:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2405312#M63136</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are 2 columns that I've created:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cumulative Load =&amp;nbsp;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&l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Index]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt;(Table2&lt;/SPAN&gt;&lt;SPAN&gt;[Month Index]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Afterwhich, the measure was created from the 2 columns:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;% Load = &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Table[Cumulative Load]&lt;/SPAN&gt;&lt;SPAN&gt;)/&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Table2[Cumulative Capacity]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 21 Mar 2022 01:19:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2405312#M63136</guid>
      <dc:creator>KHMJ</dc:creator>
      <dc:date>2022-03-21T01:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2405852#M63155</link>
      <description>&lt;P&gt;Thank you for the reply&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="368769" data-lia-user-login="KHMJ" class="lia-mention lia-mention-user"&gt;KHMJ&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here is the correct measure&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Conditional Formatting =
VAR CurrentMonth =
    SELECTEDVALUE ( Table[Month Index] )
VAR T1 =
    CALCULATETABLE (
        Table,
        REMOVEFILTERS (
            Table[Year - Month],
            Table[Year Month Index],
            Table[Month Index]
        )
    )
VAR T2 =
    SUMMARIZE ( T1, [Month Index], "%Load", [% Load] )
VAR T3 =
    FILTER ( T2, [%Load] &amp;gt; 1 )
VAR LastMonthAbove100 =
    MAXX ( T3, [Month Index] )
VAR Result =
    IF (
        CurrentMonth &amp;lt;= LastMonthAbove100,
        "#ff7276",
        IF ( CurrentMonth IN { 2, 3 }, "#ffa500", "#f8f8ff" )
    )
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;In T1 variable, please make sure to remove the filter from all the columns related to year month.&lt;BR /&gt;Have a great day!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 07:07:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2405852#M63155</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-21T07:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting in Matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2406062#M63166</link>
      <description>&lt;P&gt;This works, thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 08:17:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-formatting-in-Matrix/m-p/2406062#M63166</guid>
      <dc:creator>KHMJ</dc:creator>
      <dc:date>2022-03-21T08:17:56Z</dc:date>
    </item>
  </channel>
</rss>

