<?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: Count class changes and abandon rate in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3165067#M113803</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer to the following measures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;One_month change = var a=CALCULATE(MAX('Table'[Mon_num]),'Table'[Level]="N")
var b=IF(a&amp;lt;&amp;gt;BLANK(),CALCULATE(MAX([Level]),'Table'[Mon_num]=a+1),CALCULATE(MAX([Level]),'Table'[Mon_num]=MIN('Table'[Mon_num])))
return IF("N" in VALUES('Table'[Level])&amp;amp;&amp;amp;b="C",1,0)

Three_month change = var a=CALCULATE(MAX('Table'[Mon_num]),'Table'[Level]="N")
var b=IF(a&amp;lt;&amp;gt;BLANK(),CALCULATE(MAX([Level]),'Table'[Mon_num]=a+3),CALCULATE(MAX([Level]),'Table'[Mon_num]=MIN('Table'[Mon_num])+2))
return IF("N" in VALUES('Table'[Level])&amp;amp;&amp;amp;b="C",1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;One_month counts = SUMX(VALUES('Table'[Name]),[One_month change])

three_month counts = SUMX(VALUES('Table'[Name]),[Three_month change])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output&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;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/I&gt;, then please consider&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/I&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2023 09:33:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-03-31T09:33:17Z</dc:date>
    <item>
      <title>Count class changes and abandon rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3156694#M113239</link>
      <description>&lt;P&gt;Hi guys I really don't know how to name this question but here is what im trying to do.&lt;/P&gt;&lt;P&gt;I have stores labeled by a class A+, A, B, C and N every time we open a new store we name them N every month it changes from N to any other class based on their results, first I want to know if I can count this jumps from N-C or N-B,etc. In the first month, after three months of this change I need to see if they still at a good class. and point the ones that are "abandoned" the ones that are C class and the ones that are good A, A+.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Total of N stores that changed to C in their first month of operation =1 juanito's&lt;/P&gt;&lt;P&gt;Total of N stores abandoned "C- class" in their third month of operation = 3, Pedro's Chucho's and Pepe´s stores&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for the help! I really appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 16:58:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3156694#M113239</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-27T16:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count class changes and abandon rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3159583#M113420</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can refer to the following measures&lt;/P&gt;
&lt;P&gt;1.Create two measures to calculate the fist month and the third month level&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;One_month change = var a=CALCULATE(MAX('Table'[Mon_num]),'Table'[Level]="N")
var b=CALCULATE(MAX([Level]),'Table'[Mon_num]=a+1)
return b

Three_month change = var a=CALCULATE(MAX('Table'[Mon_num]),'Table'[Level]="N")
var b=CALCULATE(MAX([Level]),'Table'[Mon_num]=a+3)
return b&lt;/LI-CODE&gt;
&lt;P&gt;2.Then create two other measures to count the fist month counts and the third month counts&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;One_month counts = COUNTROWS( FILTER(VALUES('Table'[Name]),[One_month change]="C"))

three_month counts = COUNTROWS( FILTER(VALUES('Table'[Name]),[Three_month change]="C"))&lt;/LI-CODE&gt;
&lt;P&gt;Then display the count measures&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/I&gt;, then please consider&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/I&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 02:16:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3159583#M113420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-29T02:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count class changes and abandon rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3161640#M113569</link>
      <description>&lt;P&gt;Hello Yolo Zhu I tried to use your commands and they work but I think I just messed up a bit and here is why I thinks so. Not all workers starts from N class because they have been working longer from the data I have so they can start with other class, here is an example.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Here Aaron appears as he had his first month store as C but the thing is that he was never in the N category&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So in the mayority of cases I have data like Aaron's. What can I do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot Anonymous&lt;/LI-USER&gt;&amp;nbsp; for the help&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 18:29:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3161640#M113569</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-29T18:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count class changes and abandon rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3162078#M113590</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't quite understand how to define the first month of store opening, at first I understood that the first month after a certain store is marked N is the month in which the store is open, but you said this Aaron store, then his first month should be January?&lt;/P&gt;
&lt;P&gt;Refer to the above understanding, you can refer to the following two measures.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;One_month change = var a=CALCULATE(MAX('Table'[Mon_num]),'Table'[Level]="N")
var b=IF(a&amp;lt;&amp;gt;BLANK(),CALCULATE(MAX([Level]),'Table'[Mon_num]=a+1),CALCULATE(MAX([Level]),'Table'[Mon_num]=MIN('Table'[Mon_num])))
return b

Three_month change = var a=CALCULATE(MAX('Table'[Mon_num]),'Table'[Level]="N")
var b=IF(a&amp;lt;&amp;gt;BLANK(),CALCULATE(MAX([Level]),'Table'[Mon_num]=a+3),CALCULATE(MAX([Level]),'Table'[Mon_num]=MIN('Table'[Mon_num])+2))
return b&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I &amp;nbsp;add a number field [Month_num&amp;nbsp; in the sample data you provided&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 06:33:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3162078#M113590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-30T06:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Count class changes and abandon rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3163857#M113708</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing with Aaron store lets say the data sheet I showed is from the year 2022 but Aaron started working with us in 2021 thats why he starts the year with a classification different from N, in 2022 with the data sheet we know. Chucho started in february thats why he has the N class in february and nothing in january, what I want to do Its like you did count the steps like chucho and the others but ignoring cases like Aaron that never started as N in the year so my table only shows this cases and those jumps.&lt;/P&gt;&lt;P&gt;Here is the example lets say Aaron started january as C class instead of A&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now the formula takes january as the first month and adds it to chucho and the others which is wrong, I dont want it to take this case in consideration because Aaron was never in the N class I just want chucho and the others that joined this year working with us. If they never were in the N class in the year just ignore them "Aaron" and just take into consideration the ones that were N in the year "Chucho" "Juanito"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your time Yolo Zhu I really appreciated it!&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, 30 Mar 2023 15:41:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3163857#M113708</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-30T15:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count class changes and abandon rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3165067#M113803</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer to the following measures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;One_month change = var a=CALCULATE(MAX('Table'[Mon_num]),'Table'[Level]="N")
var b=IF(a&amp;lt;&amp;gt;BLANK(),CALCULATE(MAX([Level]),'Table'[Mon_num]=a+1),CALCULATE(MAX([Level]),'Table'[Mon_num]=MIN('Table'[Mon_num])))
return IF("N" in VALUES('Table'[Level])&amp;amp;&amp;amp;b="C",1,0)

Three_month change = var a=CALCULATE(MAX('Table'[Mon_num]),'Table'[Level]="N")
var b=IF(a&amp;lt;&amp;gt;BLANK(),CALCULATE(MAX([Level]),'Table'[Mon_num]=a+3),CALCULATE(MAX([Level]),'Table'[Mon_num]=MIN('Table'[Mon_num])+2))
return IF("N" in VALUES('Table'[Level])&amp;amp;&amp;amp;b="C",1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;One_month counts = SUMX(VALUES('Table'[Name]),[One_month change])

three_month counts = SUMX(VALUES('Table'[Name]),[Three_month change])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output&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;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/I&gt;, then please consider&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/I&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 09:33:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3165067#M113803</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-31T09:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count class changes and abandon rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3165307#M113820</link>
      <description>&lt;P&gt;HI&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Not sure if can be helpful to you&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 09:02:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-class-changes-and-abandon-rate/m-p/3165307#M113820</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-31T09:02:28Z</dc:date>
    </item>
  </channel>
</rss>

