<?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 Matrix - filter every red coloured rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3473454#M132655</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a stock overview report i've created a conditonal measure which colours the value for each article in each month red if the stock goes below zero or below the minimal stock quantity. To make it more user friendly for the user I would like to have a filter that only shows every red coloured cell in the matrix instead of the whole list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The filter I've made is unfortunately only looking to the stock value of the last month (2023-11) in the matrix, so if there is a stock issue in 2023-10 but in 2023-11 it is resolved, this whole row is filtered out. How can I fix this so I always see all the red rows?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure I'm using is:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Kleurfilter =&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[kleurvariabelen 1]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"#EFB5B9"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Kleurvariabelen 1] is a measure for determining if the value should be red or transparent.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This is how the filter works at the moment:&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;If the filter is off you can see that the outlined row is missing while the value is red in 2023-10.&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2023 12:19:31 GMT</pubDate>
    <dc:creator>JFR2022</dc:creator>
    <dc:date>2023-10-12T12:19:31Z</dc:date>
    <item>
      <title>Matrix - filter every red coloured rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3473454#M132655</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a stock overview report i've created a conditonal measure which colours the value for each article in each month red if the stock goes below zero or below the minimal stock quantity. To make it more user friendly for the user I would like to have a filter that only shows every red coloured cell in the matrix instead of the whole list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The filter I've made is unfortunately only looking to the stock value of the last month (2023-11) in the matrix, so if there is a stock issue in 2023-10 but in 2023-11 it is resolved, this whole row is filtered out. How can I fix this so I always see all the red rows?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure I'm using is:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Kleurfilter =&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[kleurvariabelen 1]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"#EFB5B9"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Kleurvariabelen 1] is a measure for determining if the value should be red or transparent.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This is how the filter works at the moment:&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;If the filter is off you can see that the outlined row is missing while the value is red in 2023-10.&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 12:19:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3473454#M132655</guid>
      <dc:creator>JFR2022</dc:creator>
      <dc:date>2023-10-12T12:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix - filter every red coloured rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3475030#M132734</link>
      <description>&lt;P&gt;Could you try adding some variables to the measure so that it looks at each column individually?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;var _thismonth =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;[Month]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_&lt;/SPAN&gt;&lt;SPAN&gt;lastmonth&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;[Month]&lt;/SPAN&gt;&lt;S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3 4 5 6 7"&gt;&lt;SPAN&gt;Return _filter&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 07:45:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3475030#M132734</guid>
      <dc:creator>PurpleGate</dc:creator>
      <dc:date>2023-10-13T07:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix - filter every red coloured rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3477845#M132910</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="442212" data-lia-user-login="JFR2022" class="lia-mention lia-mention-user"&gt;JFR2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Create measure.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Kleurfilter =
var _min=MINX(FILTER(ALL('True'),'True'[Attribute]=MAX('True'[Attribute])),'True'[Value])
return
IF(
    MAX('True'[Value]) &amp;lt;0 || MAX('True'[Value])&amp;lt; _min,"white","red")&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Flag =
var _count=
COUNTX(
    FILTER(ALL('True'),
    [Kleurfilter]="red"&amp;amp;&amp;amp;'True'[Artikelnr]=MAX('True'[Artikelnr])),[Kleurfilter])
return
IF(
    _count &amp;gt;=1,1,0)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Result:&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;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 05:04:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3477845#M132910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-16T05:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix - filter every red coloured rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3478762#M132954</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply!&lt;/P&gt;&lt;P&gt;Unfortunately this is not working for me at the moment. This is how my measure looks right now, to make it more clear i've added the "kleurvariabelen" measure as a variable to the new measure. It basically says if the cumulative stock measure &amp;gt; the minimum stock measure or &amp;gt;0 it should become red.&lt;/P&gt;&lt;P&gt;I've adjusted your _lastmonth to _nextmonth because I have to look in te future instead of the past.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Kleurfilter = 
var _kleurvariabelen = if(OR([cumulatieve voorraad] &amp;lt; [som minimale voorraad], [cumulatieve voorraad] &amp;lt; 0),"#EFB5B9","#FFFFFF")
var _thismonth = calculate(SELECTEDVALUE('Date toekomst'[YearMonthnumber]),filter('Date toekomst','Date toekomst'[Date] = today()))
var _nextmonth = calculate(SELECTEDVALUE('Date toekomst'[YearMonthnumber]),DATESMTD(DATEADD('Date toekomst'[Date],1,MONTH)))
var _filter = IF(OR(AND(_kleurvariabelen = "#EFB5B9",_thismonth),and(_kleurvariabelen = "#EFB5B9",_nextmonth)),1,0)
Return _filter&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result of this measure is the same as I've had with my original measure. The YearMonthNumber is the column I'm using in my slicer list:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Oct 2023 11:59:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3478762#M132954</guid>
      <dc:creator>JFR2022</dc:creator>
      <dc:date>2023-10-16T11:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix - filter every red coloured rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3478928#M132962</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply!&lt;/P&gt;&lt;P&gt;I've downloaded your .pbix file but I think my situation is a little bit different. Right now your suggestion for the "kleurfilter" is not working. The calculation of the stock is based on a measure 'cumulative voorraad" (cumulative stock), so the MAX function in your measure is not working for me because I cant use a column. I'm using the YearMonthNumber from a Date table "Date toekomst"&amp;nbsp;&lt;BR /&gt;The kleurfilter measure if tried for your solution:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Kleurfilter1 = 
var _min=MINX(FILTER(ALL('Date toekomst'),'Date toekomst'[YearMonthnumber]=MAX('Date toekomst'[YearMonthnumber])),[cumulatieve voorraad])
return
IF(
    [cumulatieve voorraad] &amp;lt; 0 || [cumulatieve voorraad] &amp;lt; _min,"#EFB5B9","#FFFFFF")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The conditional for the cumulative stock to turn red =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_kleurvariabelen&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;OR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[cumulatieve voorraad]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;[som minimale voorraad]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;[cumulatieve voorraad]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"#EFB5B9"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"#FFFFFF"&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[som minimale voorraad] = minimum stock.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Oct 2023 13:15:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-filter-every-red-coloured-rows/m-p/3478928#M132962</guid>
      <dc:creator>JFR2022</dc:creator>
      <dc:date>2023-10-16T13:15:58Z</dc:date>
    </item>
  </channel>
</rss>

