<?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: Highlight combinations with consecutive negative or positive values from another measuer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Highlight-combinations-with-consecutive-negative-or-positive/m-p/2822320#M89607</link>
    <description>&lt;P&gt;You can add a calculated column like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Num consecutive = 
VAR CurrentError = 'Table'[Error]
VAR CurrentDate = 'Table'[Month_Year]
VAR StartDate = EOMONTH(CurrentDate, -3) + 1
VAR SummaryTable = CALCULATETABLE( 'Table',
    ALLEXCEPT('Table', 'Table'[Region], 'Table'[Demand group] ), 
    'Table'[Month_Year] &amp;gt;= StartDate &amp;amp;&amp;amp; 'Table'[Month_Year] &amp;lt;= CurrentDate,
    SWITCH( SIGN(CurrentError),
        -1, 'Table'[Error] &amp;lt; 0,
        1, 'Table'[Error] &amp;gt; 0,
        FALSE()
    )
)
return COUNTROWS( SummaryTable )&lt;/LI-CODE&gt;
&lt;P&gt;The Year Month column needs to be an actual date.&lt;/P&gt;
&lt;P&gt;You can then filter the table for any rows where Num consecutive is &amp;gt;= 3&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2022 09:51:48 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2022-10-06T09:51:48Z</dc:date>
    <item>
      <title>Highlight combinations with consecutive negative or positive values from another measuer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Highlight-combinations-with-consecutive-negative-or-positive/m-p/2821954#M89588</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to create a table that only contains planning combinations (region+demand group) which have had three consecutive periods with either negative or positive value. In the example below the table should only show the combination of Region A and Demand Group 1 and NOT Region B and Demand Group B. Can I set that up with filters on the current data or do I need a new measure to use as filter? How would that measure look like?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Region&lt;/TD&gt;&lt;TD&gt;Demand group&lt;/TD&gt;&lt;TD&gt;Month_Year&lt;/TD&gt;&lt;TD&gt;Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Sep, 2022&lt;/TD&gt;&lt;TD&gt;-2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Aug, 2022&lt;/TD&gt;&lt;TD&gt;-5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Jul, 2022&lt;/TD&gt;&lt;TD&gt;-7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Sep, 2022&lt;/TD&gt;&lt;TD&gt;-5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Aug, 2022&lt;/TD&gt;&lt;TD&gt;-8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Jul, 2022&lt;/TD&gt;&lt;TD&gt;+9&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 07:59:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Highlight-combinations-with-consecutive-negative-or-positive/m-p/2821954#M89588</guid>
      <dc:creator>KMadsen</dc:creator>
      <dc:date>2022-10-06T07:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight combinations with consecutive negative or positive values from another measuer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Highlight-combinations-with-consecutive-negative-or-positive/m-p/2822320#M89607</link>
      <description>&lt;P&gt;You can add a calculated column like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Num consecutive = 
VAR CurrentError = 'Table'[Error]
VAR CurrentDate = 'Table'[Month_Year]
VAR StartDate = EOMONTH(CurrentDate, -3) + 1
VAR SummaryTable = CALCULATETABLE( 'Table',
    ALLEXCEPT('Table', 'Table'[Region], 'Table'[Demand group] ), 
    'Table'[Month_Year] &amp;gt;= StartDate &amp;amp;&amp;amp; 'Table'[Month_Year] &amp;lt;= CurrentDate,
    SWITCH( SIGN(CurrentError),
        -1, 'Table'[Error] &amp;lt; 0,
        1, 'Table'[Error] &amp;gt; 0,
        FALSE()
    )
)
return COUNTROWS( SummaryTable )&lt;/LI-CODE&gt;
&lt;P&gt;The Year Month column needs to be an actual date.&lt;/P&gt;
&lt;P&gt;You can then filter the table for any rows where Num consecutive is &amp;gt;= 3&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 09:51:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Highlight-combinations-with-consecutive-negative-or-positive/m-p/2822320#M89607</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-10-06T09:51:48Z</dc:date>
    </item>
  </channel>
</rss>

