<?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: How to count the number of connection attempts to make the first successful call in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572177#M73503</link>
    <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this calculated column. See it all at work in the attached file.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Attempt = 
VAR previousPU_ =
    CALCULATE (
        MAX ( Table1[Call_id] ),
        Table1[Call_id] &amp;lt; EARLIER ( Table1[Call_id] ),
        Table1[Call status] = "picked up",
        ALLEXCEPT ( Table1, Table1[Customer ID] )
    )
RETURN
    CALCULATE (
        COUNT ( Table1[Call status] ),
        Table1[Call_id] &amp;lt;= EARLIER ( Table1[Call_id] ),
        Table1[Call_id] &amp;gt; previousPU_,
        ALLEXCEPT ( Table1, Table1[Customer ID] )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2022 15:47:58 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2022-06-10T15:47:58Z</dc:date>
    <item>
      <title>How to count the number of connection attempts to make the first successful call</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572069#M73488</link>
      <description>&lt;P&gt;Hello I really need your help. I would like to create a calculated column that would count the number of attempts we needed to contact a unique customer in a call center. However, it is important for me that the counter restarts after each successful attempt to reach the customer (when call_status = picked up). So for each conversation of a given client, I would like to know which is the attempt to reach him after the last successful conversation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of such data and the calculated column I would like to get - "Attempt"&lt;/P&gt;&lt;P&gt;I will be very grateful for any help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&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;Call_id&lt;/TD&gt;&lt;TD&gt;Call_start time&lt;/TD&gt;&lt;TD&gt;Customer ID&lt;/TD&gt;&lt;TD&gt;Call status&lt;/TD&gt;&lt;TD&gt;Attempt&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;10.06.2022 09:22&lt;/TD&gt;&lt;TD&gt;C1&lt;/TD&gt;&lt;TD&gt;picked up&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;10.06.2022 09:40&lt;/TD&gt;&lt;TD&gt;C1&lt;/TD&gt;&lt;TD&gt;missed&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;10.06.2022 09:45&lt;/TD&gt;&lt;TD&gt;C1&lt;/TD&gt;&lt;TD&gt;missed&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;11.06.2022 11:45&lt;/TD&gt;&lt;TD&gt;C1&lt;/TD&gt;&lt;TD&gt;picked up&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;12.06.2022 15:45&lt;/TD&gt;&lt;TD&gt;C1&lt;/TD&gt;&lt;TD&gt;missed&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;13.06.2022 15:45&lt;/TD&gt;&lt;TD&gt;C2&lt;/TD&gt;&lt;TD&gt;missed&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;14.06.2022 11:45&lt;/TD&gt;&lt;TD&gt;C2&lt;/TD&gt;&lt;TD&gt;missed&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;15.06.2022 10:45&lt;/TD&gt;&lt;TD&gt;C2&lt;/TD&gt;&lt;TD&gt;picked up&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;15.06.2022 11:45&lt;/TD&gt;&lt;TD&gt;C2&lt;/TD&gt;&lt;TD&gt;picked up&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>Fri, 10 Jun 2022 14:58:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572069#M73488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-10T14:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of connection attempts to make the first successful call</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572155#M73497</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Create this calculated column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Attempt Calculated Column = 
VAR _currnet_customer = 'Table'[Customer ID]
VAR _current_time = 'Table'[Call_start time]
VAR _last_picked_up_for_customer = COALESCE(MAXX(FILTER('Table', 'Table'[Customer ID] = _currnet_customer &amp;amp;&amp;amp;'Table'[Call_start time] &amp;lt; _current_time &amp;amp;&amp;amp;'Table'[Call status] = "picked up"),'Table'[Call_start time]),0)
VAR _result = 
    COUNTROWS(FILTER('Table', 'Table'[Customer ID] = _currnet_customer &amp;amp;&amp;amp;'Table'[Call_start time] &amp;lt;= _current_time &amp;amp;&amp;amp;'Table'[Call_start time] &amp;gt; _last_picked_up_for_customer)) 
RETURN
    _result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Data-Stories-Gallery/Contoso-by-SpartaBI/m-p/2449543" target="_blank" rel="noopener"&gt;&lt;FONT size="4" color="#0000EE"&gt;Showcase Report – Contoso By SpartaBI&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A href="https://www.linkedin.com/company/spartabi" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt; &amp;nbsp;&amp;nbsp;&lt;A href="https://www.facebook.com/SpartaBI" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 15:39:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572155#M73497</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-06-10T15:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of connection attempts to make the first successful call</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572177#M73503</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this calculated column. See it all at work in the attached file.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Attempt = 
VAR previousPU_ =
    CALCULATE (
        MAX ( Table1[Call_id] ),
        Table1[Call_id] &amp;lt; EARLIER ( Table1[Call_id] ),
        Table1[Call status] = "picked up",
        ALLEXCEPT ( Table1, Table1[Customer ID] )
    )
RETURN
    CALCULATE (
        COUNT ( Table1[Call status] ),
        Table1[Call_id] &amp;lt;= EARLIER ( Table1[Call_id] ),
        Table1[Call_id] &amp;gt; previousPU_,
        ALLEXCEPT ( Table1, Table1[Customer ID] )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 15:47:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572177#M73503</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2022-06-10T15:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of connection attempts to make the first successful call</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572453#M73524</link>
      <description>&lt;P&gt;For fun only, a showcase of powerful Table.Group() in PQ; and the Call_id is redundant.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bc5LCoAwDEXRrUjGUpLY+pu6jOLIdlBEEMT9awQ/tZ1eDnmxFghKIFRYK0bmArue+UyD9DVMs3fFvsJYWuBEarzlErbNu4tVKTMZpoXRw4g+LN6VTPxKkz9YC6tSxjFrhOl098daYeZl+GHxe91PUl6OBw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Call_id = _t, #"Call_start time" = _t, #"Customer ID" = _t, #"Call status" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Call_id", Int64.Type}, {"Call_start time", type datetime}, {"Customer ID", type text}, {"Call status", type text}}, "fr"),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", -1),

    Grouped = let l = List.PositionOf(#"Added Index"[Call status],"picked up",2) in Table.Group(#"Added Index", "Customer ID", {"grp", each Table.Group(_, "Index", {"gr", each Table.AddIndexColumn(_, "Attempt", 1)}, 0, (x,y) =&amp;gt; Byte.From(List.Contains(l, y)))}),

    #"Expanded grp" = Table.ExpandTableColumn(Grouped, "grp", {"gr"}),
    #"Expanded gr" = Table.ExpandTableColumn(#"Expanded grp", "gr", {"Call_start time", "Call status", "Attempt"})
in
    #"Expanded gr"&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A showcase of powerful Excel worksheet formula,&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 19:29:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572453#M73524</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-06-10T19:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of connection attempts to make the first successful call</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572645#M73543</link>
      <description>&lt;P&gt;WOW, my top secret function will help.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;This function work with large dateset.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This function only work with&amp;nbsp;&lt;SPAN&gt;DESC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;my funcion1&lt;/SPAN&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Timesindex = RANKX(FILTER(orders,orders[user_id]=EARLIER(orders[user_id]) &amp;amp;&amp;amp; orders[LastDays]&amp;gt;30),orders[done_at],orders[done_at],DESC)&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my function 2 //make it asc order&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;&lt;LI-CODE lang="markup"&gt;Time2 = RANKX(FILTER(orders,orders[user_id]=EARLIER(orders[user_id]) &amp;amp;&amp;amp; orders[Timesindex]=EARLIER(orders[Timesindex])),orders[done_at],orders[done_at],ASC)&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;first function for you:&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;&lt;LI-CODE lang="markup"&gt;Timesindex = 
RANKX(
    FILTER(
        orders,
        Table1[Customer ID] = EARLIER(Table1[Customer ID]) &amp;amp;&amp;amp; 
        Table1[Call status] = "picked up"
    ),
    Table1[Call_start time],
    Table1[Call_start time],
    DESC
)&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second Function for you&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;&lt;LI-CODE lang="markup"&gt;Attempt = 
RANKX(
    FILTER(
        orders,
        Table1[Customer ID] = EARLIER(Table1[Customer ID]) &amp;amp;&amp;amp; 
        orders[Timesindex] = EARLIER(orders[Timesindex])
    ),
    Table1[Call_start time],
    Table1[Call_start time],
    ASC
)&lt;/LI-CODE&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>Sat, 11 Jun 2022 01:05:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2572645#M73543</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-11T01:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of connection attempts to make the first successful call</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2576638#M73791</link>
      <description>&lt;P&gt;Hi everyone, thank you for all the answers. Dax is amazing that there are so many different ways to approach the same problem.&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="377293" data-lia-user-login="SpartaBI" class="lia-mention lia-mention-user"&gt;SpartaBI&lt;/a&gt;&amp;nbsp; Your solution is the best, it is a calculated column and it is very well optimized, thank you very much for your help.&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&amp;nbsp;&amp;nbsp;really thanks for the answer, unfortunately your approach has performance issues and I haven't been able to apply your formula to my large dataset of over 2 million conversations.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="359999" data-lia-user-login="vapid128" class="lia-mention lia-mention-user"&gt;vapid128&lt;/a&gt;&amp;nbsp;vapid128 you are absolutely right your code runs very fast for large datasets, but unfortunately the result is a little different than expected. That is, with your code, any picked up call resets counter, so all picked up calls are Attempt = 1. However, I would like this counter to restart after each successful call, and not with each successful call.&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;&amp;nbsp;- thank you also for your answer, the result of your code is correct, but I really wanted it to be a calculated column. By the way, with my dataset, finally refreshing this table also took a lot of time: /&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 05:02:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2576638#M73791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-14T05:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the number of connection attempts to make the first successful call</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2576711#M73798</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;my pleasure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; and thank you for taking the time to check each solution everyone gave you and respond to each one of the amzaing community members who tried to help. This is really appreciated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hey, check out my showcase report - got some high level stuff there &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543" target="_blank"&gt;https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543&lt;/A&gt;&lt;BR /&gt;Give it a thumbs up over there if you liked it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 05:58:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-count-the-number-of-connection-attempts-to-make-the-first/m-p/2576711#M73798</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-06-14T05:58:08Z</dc:date>
    </item>
  </channel>
</rss>

