<?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 attempts between success, before success, average attempts between success. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455755#M66254</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And for each account there could be more than 2 two successful attempts?&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2022 19:03:17 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-04-13T19:03:17Z</dc:date>
    <item>
      <title>Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455728#M66251</link>
      <description>&lt;P&gt;Hello, Example data below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im curious on how to count the number of "RepOuts" between the 1st success and the 2nd success, answer is 2. The data looks like this with different "ClassAccount" numbers and im looking to find an average number of "RepOut" between success. Or even how many "repout" before the 1st success.&amp;nbsp;&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;ClassAccount&lt;/TD&gt;&lt;TD&gt;Action&lt;/TD&gt;&lt;TD&gt;Result&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;RepOut&lt;/TD&gt;&lt;TD&gt;Success&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;503207139&lt;/TD&gt;&lt;TD&gt;TH&lt;/TD&gt;&lt;TD&gt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&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;503207139&lt;/TD&gt;&lt;TD&gt;RN&lt;/TD&gt;&lt;TD&gt;MO&lt;/TD&gt;&lt;TD&gt;1/14/2022&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;503207139&lt;/TD&gt;&lt;TD&gt;TH&lt;/TD&gt;&lt;TD&gt;PN&lt;/TD&gt;&lt;TD&gt;1/14/2022&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 18:36:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455728#M66251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-13T18:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455747#M66252</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please explain how the answer is 2?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 18:55:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455747#M66252</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-13T18:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455753#M66253</link>
      <description>&lt;P&gt;In this case there are 2 rows where repout = 1 and success =0, which means 2 failed attempts. A successful attempt is repout=1 and success=1. Since those 2 failed attempts happened between the 1st success and the 2nd success, the answer is 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im trying to find the average number of failed attempts to collected between successful attempts.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 19:02:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455753#M66253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-13T19:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455755#M66254</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And for each account there could be more than 2 two successful attempts?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 19:03:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455755#M66254</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-13T19:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455759#M66255</link>
      <description>&lt;P&gt;Yes, this is just one example using 1 account with a short date range. The data has multiple accounts with multiple lines of failed attempts and successful attempts, im looking to find the average number of failed attempts between successful attempts, on the account level.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 19:06:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455759#M66255</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-13T19:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455768#M66256</link>
      <description>&lt;P&gt;I understand that but my question was about &lt;STRONG&gt;each account.&lt;/STRONG&gt; There should be maximum of 2 successful attempts or is possible to have more than 2 successful attempts for each account.&amp;nbsp;&lt;BR /&gt;Also what would be the average? If the numerator is the number of attempts between successful attempts, what would be the numerator?&amp;nbsp;&lt;BR /&gt;how are you planning to display the result? On a card visual or on a table by account?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 19:15:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455768#M66256</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-13T19:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455772#M66257</link>
      <description>&lt;P&gt;yes, its possible to have more than 2 successful atempts per account.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the average would be, Numerator = sum of the failed attempts between successes, divided by the denominator = number of gaps between successes? If i said that right, the denominator could also be the number of successes - 1 to remove the 1st success that didnt have a success prior to it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 19:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455772#M66257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-13T19:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455829#M66264</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Average Failed =
VAR Numerator =
    SUMX ( Table, IF ( Table[RepOut Success] = 0, 1, 0 ) )
VAR Denominator =
    SUM ( Table[RepOut Success] ) -1
RETURN
    DIVIDE ( Numerator, Denominator )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 20:08:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2455829#M66264</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-13T20:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count attempts between success, before success, average attempts between success.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2462546#M66734</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. In Power query. Add Column – Index Column – From 1.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
IF(
    'Table'[Success]=1&amp;amp;&amp;amp;'Table'[RepOut]=1,0,
    IF(
        'Table'[RepOut]=1&amp;amp;&amp;amp;'Table'[Success]=0,1,2))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;IF =
IF(
    'Table'[Flag]=0,1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;group =
var _1=CALCULATE(SUM('Table'[IF]),FILTER(ALL('Table'),'Table'[ClassAccount]=EARLIER('Table'[ClassAccount])&amp;amp;&amp;amp;'Table'[Index]&amp;lt;EARLIER('Table'[Index])))
return
_1&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;failed attempts =
CALCULATE(COUNT('Table'[Flag]),FILTER(ALL('Table'),'Table'[ClassAccount]=EARLIER('Table'[ClassAccount])&amp;amp;&amp;amp;'Table'[group]=EARLIER('Table'[group])&amp;amp;&amp;amp;'Table'[Flag]=1))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;the number of successes =
CALCULATE(COUNT('Table'[Flag]),FILTER(ALL('Table'),'Table'[ClassAccount]=EARLIER('Table'[ClassAccount])&amp;amp;&amp;amp;'Table'[group]=EARLIER('Table'[group])&amp;amp;&amp;amp;'Table'[Flag]=0))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;average =
DIVIDE('Table'[failed attempts],'Table'[the number of successes])&lt;/LI-CODE&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please click here for the &lt;A href="https://m365x668238-my.sharepoint.com/:u:/g/personal/yangliu_m365x668238_onmicrosoft_com/EVcFCi5D7K9MqBzaGYiBJrgBxNFqjcEts5Hux-Y5yB4vZA?e=SnBaMp" target="_self"&gt;pbix&lt;/A&gt; file&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>Tue, 19 Apr 2022 05:03:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-attempts-between-success-before-success-average-attempts/m-p/2462546#M66734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-19T05:03:20Z</dc:date>
    </item>
  </channel>
</rss>

