<?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 Creating a Flag for Stable or Reduced Rating in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Flag-for-Stable-or-Reduced-Rating/m-p/2282494#M55879</link>
    <description>&lt;P&gt;Hi Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table similar to the below:&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;Client&lt;/TD&gt;&lt;TD&gt;Assessment&lt;/TD&gt;&lt;TD&gt;Rating&lt;/TD&gt;&lt;TD&gt;Flag&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;Initial&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Stable or Reduced&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Initial&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Stable or Reduced&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Final&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Stable or Reduced&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Final&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Stable or Reduced&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;Initial&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Not Stable or Reduced&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;Final&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Not Stable or Reduced&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, I am looking to create a column with a flag (similar to the last one above) that I can use as a filter, which indicates whether a client - from their Initial to Final Assessment - provided a stable or reduced rating. If their rating went up, then I'd like to exclude them from the flag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the trouble I'm having with this is that the rating provided can be anywhere from 1 to 5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any and all advice on how to accomplish this either via a conditional column or a measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jan 2022 21:24:59 GMT</pubDate>
    <dc:creator>samdep</dc:creator>
    <dc:date>2022-01-13T21:24:59Z</dc:date>
    <item>
      <title>Creating a Flag for Stable or Reduced Rating</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Flag-for-Stable-or-Reduced-Rating/m-p/2282494#M55879</link>
      <description>&lt;P&gt;Hi Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table similar to the below:&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;Client&lt;/TD&gt;&lt;TD&gt;Assessment&lt;/TD&gt;&lt;TD&gt;Rating&lt;/TD&gt;&lt;TD&gt;Flag&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;Initial&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Stable or Reduced&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Initial&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Stable or Reduced&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Final&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Stable or Reduced&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Final&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Stable or Reduced&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;Initial&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Not Stable or Reduced&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;Final&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Not Stable or Reduced&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, I am looking to create a column with a flag (similar to the last one above) that I can use as a filter, which indicates whether a client - from their Initial to Final Assessment - provided a stable or reduced rating. If their rating went up, then I'd like to exclude them from the flag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the trouble I'm having with this is that the rating provided can be anywhere from 1 to 5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any and all advice on how to accomplish this either via a conditional column or a measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 21:24:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Flag-for-Stable-or-Reduced-Rating/m-p/2282494#M55879</guid>
      <dc:creator>samdep</dc:creator>
      <dc:date>2022-01-13T21:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Flag for Stable or Reduced Rating</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Flag-for-Stable-or-Reduced-Rating/m-p/2282511#M55881</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="294395" data-lia-user-login="samdep" class="lia-mention lia-mention-user"&gt;samdep&lt;/a&gt;&amp;nbsp;Seems like you need to be able to compare the current row with the previous row, that's the MTBF pattern. Although your use case is entirely different. You will need an index column or date column to define "previous".&lt;/P&gt;
&lt;P&gt;See my article on Mean Time Between Failure (MTBF) which uses EARLIER: &lt;A href="http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586" target="_blank"&gt;http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586&lt;/A&gt;.&lt;BR /&gt;The basic pattern is:&lt;BR /&gt;Column =&amp;nbsp;&lt;BR /&gt;&amp;nbsp; VAR __Current = [Value]&lt;BR /&gt;&amp;nbsp; VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] &amp;lt; EARLIER('Table'[Date])),[Date])&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])&lt;BR /&gt;RETURN&lt;BR /&gt;&amp;nbsp; __Current - __Previous&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 21:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Flag-for-Stable-or-Reduced-Rating/m-p/2282511#M55881</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-01-13T21:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Flag for Stable or Reduced Rating</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Flag-for-Stable-or-Reduced-Rating/m-p/2284108#M55961</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;- Thank you, this worked for my needs! Unfortunately, while I have a date field, it isn't reliable (out of order, etc.), but your index suggestion was extremely helpful. An outright addition of an index wouldn't necessarily work since there other assessments in between these and not necessarily ordered accurately. But, I was able to assign an "index" of sorts to the the two respective assessments - and from there, the MTBF pattern works perfectly. Thank you again!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 16:14:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Flag-for-Stable-or-Reduced-Rating/m-p/2284108#M55961</guid>
      <dc:creator>samdep</dc:creator>
      <dc:date>2022-01-14T16:14:08Z</dc:date>
    </item>
  </channel>
</rss>

