<?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: Longitudinal injuries - how many players are injured at any timepoint in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463257#M66797</link>
    <description>&lt;P&gt;I can show an outline of the table below if that works: EDIT: I use the DD-MM-YYYY format&lt;BR /&gt;- from the 28th of August it should show one injury, until&amp;nbsp;6th of September. Then it should show two injuries 10th of September. etc.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Player&lt;/TD&gt;&lt;TD&gt;Team&lt;/TD&gt;&lt;TD&gt;Season&lt;/TD&gt;&lt;TD&gt;Start injury&lt;/TD&gt;&lt;TD&gt;End injury&lt;/TD&gt;&lt;TD&gt;Time-loss&lt;/TD&gt;&lt;TD&gt;Location&lt;/TD&gt;&lt;TD&gt;Activity&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;&lt;P&gt;2021-2022&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;28-8-2021&lt;/TD&gt;&lt;TD&gt;10-9-2021&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;Ankle&lt;/TD&gt;&lt;TD&gt;Training&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;2021-2022&lt;/TD&gt;&lt;TD&gt;6-9-2021&lt;/TD&gt;&lt;TD&gt;13-9-2021&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Ankle&lt;/TD&gt;&lt;TD&gt;Match&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2021-2022&lt;/TD&gt;&lt;TD&gt;9-9-2021&lt;/TD&gt;&lt;TD&gt;15-9-2021&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Ankle&lt;/TD&gt;&lt;TD&gt;Training&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2021-2022&lt;/TD&gt;&lt;TD&gt;13-9-2021&lt;/TD&gt;&lt;TD&gt;17-9-2021&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Thigh&lt;/TD&gt;&lt;TD&gt;Match&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2021-2022&lt;/TD&gt;&lt;TD&gt;13-9-2021&lt;/TD&gt;&lt;TD&gt;24-9-2021&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;Knee&lt;/TD&gt;&lt;TD&gt;Match&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I have two active tables: the one you see above and one date-table (with all possible variations of notations of dates from 2010 till 2025). This has a one-to-many relation with the injury table.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2022 09:59:20 GMT</pubDate>
    <dc:creator>Maestro</dc:creator>
    <dc:date>2022-04-19T09:59:20Z</dc:date>
    <item>
      <title>Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463137#M66785</link>
      <description>&lt;P&gt;Hi all, at the moment I am working on injury data over multiple seasons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Key information for everyone is: how many players do you have available. Therefore, we want to see how many players are injured at any moment in time (is it generally 3 or 8 players that you can't use). Therefore I want a graph as shown below (made in Excel): over the timeframe I want the # of players that are injured. For this purpose I have the date of occurence and date of return-to-play. In the graph you can see on the x-axis the date and on the y-axis the amount of injuries for each team (team is different colors). For example: a player in the 'blue' team is injured from 1st of June till 3rd of August --&amp;gt; he should be counted as 'one injury' for the whole time-period, not just the start of his injury. In addition to this player more players in this team become injured and add up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;I have already tried distinctcount, count or datesbetween combinations of DAX formulas, but I am too much of a beginner to get it working. I also tried to generate a new table as 'count', with date filters and summarizing countrows, but everything I try: it is not valid, unfortunately.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table = 
VAR ExpandedTable =     
    GENERATE(
        CALENDAR(DATE(2010,1,1),DATE(2025,12,31)),
        FILTER(
            'Blessures',
            [Date]&amp;gt;='injuries'[start_injury] &amp;amp;&amp;amp;
            [Date]&amp;lt; IF(ISBLANK('injuries'stop_injury),TODAY(),'injuries'stop_injury)
            )
            )
            
RETURN 
    SUMMARIZE(  
        ExpandedTable,
        [Date] ,
        [Team], 
        "Count",COUNTROWS('injuries')
        )   &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope I showcased the problem clearly. If anything is still unclear, please let me know! Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 09:21:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463137#M66785</guid>
      <dc:creator>Maestro</dc:creator>
      <dc:date>2022-04-19T09:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463227#M66793</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would be great if you could share some sample data (without any sensitive infos) using One Drive, Google Drive...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How many tables in your model and is one of them a Date table with a relationship to your injuries table ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let us know...&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 09:43:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463227#M66793</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2022-04-19T09:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463257#M66797</link>
      <description>&lt;P&gt;I can show an outline of the table below if that works: EDIT: I use the DD-MM-YYYY format&lt;BR /&gt;- from the 28th of August it should show one injury, until&amp;nbsp;6th of September. Then it should show two injuries 10th of September. etc.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Player&lt;/TD&gt;&lt;TD&gt;Team&lt;/TD&gt;&lt;TD&gt;Season&lt;/TD&gt;&lt;TD&gt;Start injury&lt;/TD&gt;&lt;TD&gt;End injury&lt;/TD&gt;&lt;TD&gt;Time-loss&lt;/TD&gt;&lt;TD&gt;Location&lt;/TD&gt;&lt;TD&gt;Activity&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;&lt;P&gt;2021-2022&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;28-8-2021&lt;/TD&gt;&lt;TD&gt;10-9-2021&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;Ankle&lt;/TD&gt;&lt;TD&gt;Training&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;2021-2022&lt;/TD&gt;&lt;TD&gt;6-9-2021&lt;/TD&gt;&lt;TD&gt;13-9-2021&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Ankle&lt;/TD&gt;&lt;TD&gt;Match&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2021-2022&lt;/TD&gt;&lt;TD&gt;9-9-2021&lt;/TD&gt;&lt;TD&gt;15-9-2021&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Ankle&lt;/TD&gt;&lt;TD&gt;Training&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2021-2022&lt;/TD&gt;&lt;TD&gt;13-9-2021&lt;/TD&gt;&lt;TD&gt;17-9-2021&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Thigh&lt;/TD&gt;&lt;TD&gt;Match&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2021-2022&lt;/TD&gt;&lt;TD&gt;13-9-2021&lt;/TD&gt;&lt;TD&gt;24-9-2021&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;Knee&lt;/TD&gt;&lt;TD&gt;Match&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I have two active tables: the one you see above and one date-table (with all possible variations of notations of dates from 2010 till 2025). This has a one-to-many relation with the injury table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 09:59:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463257#M66797</guid>
      <dc:creator>Maestro</dc:creator>
      <dc:date>2022-04-19T09:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463301#M66800</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="322371" data-lia-user-login="Maestro" class="lia-mention lia-mention-user"&gt;Maestro&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to have a date table. Then you may try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Count Injuries =
SUMX (
    'Date',
    VAR CurrentDate = 'Date'[Date]
    RETURN
        SUMX (
            injuries,
            injuries[start_injury] &amp;lt;= CurrentDate
                &amp;amp;&amp;amp; OR ( ISBLANK ( injuries[stop_injury] ), injuries[stop_injury] &amp;gt; CurrentDate )
        )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 10:21:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463301#M66800</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-19T10:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463361#M66804</link>
      <description>&lt;P&gt;It shows the error that the function SUMX cannot use the type "Boolean". Btw. I do have a date table, so that should not be the problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 10:52:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463361#M66804</guid>
      <dc:creator>Maestro</dc:creator>
      <dc:date>2022-04-19T10:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463378#M66805</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe try with :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;amp; ( ISBLANK ( injuries[stop_injury] ) || injuries[stop_injury] &amp;gt; CurrentDate )&lt;BR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;why do you prefer a SUMX instead of COUNTX ?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 10:59:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463378#M66805</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2022-04-19T10:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463401#M66807</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="322371" data-lia-user-login="Maestro" class="lia-mention lia-mention-user"&gt;Maestro&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Apologies i missed the IF&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Count Injuries =
SUMX (
    'Date',
    VAR CurrentDate = 'Date'[Date]
    RETURN
        SUMX (
            injuries,
            IF (
                injuries[start_injury] &amp;lt;= CurrentDate
                    &amp;amp;&amp;amp; OR ( ISBLANK ( injuries[stop_injury] ), injuries[stop_injury] &amp;gt; CurrentDate ),
                1,
                0
            )
        )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 19 Apr 2022 11:03:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463401#M66807</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-19T11:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463423#M66808</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="120362" data-lia-user-login="AilleryO" class="lia-mention lia-mention-user"&gt;AilleryO&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Two reasons. I trust it more and it performs faster. However, can be much efficient using SUMMARIZE&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 11:08:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463423#M66808</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-19T11:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463648#M66828</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I add some datas to your dummy data to check, and this seems to work well :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Count of Injuries at date (mesure) = &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;DateCurrent&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries[start injury]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries[Player]&lt;/SPAN&gt;&lt;SPAN&gt; ) , &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries&lt;/SPAN&gt;&lt;SPAN&gt; ) , &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TabInjuries[Start injury]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;DateCurrent&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries[End injury]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;DateCurrent&lt;/SPAN&gt;&lt;SPAN&gt; || &lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries[End injury]&lt;/SPAN&gt;&lt;SPAN&gt; ) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Gives that :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In my table (screenshot) you can see two columns because I made calculation as well as column (depending on your needs).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Column will be :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Count of Injuries at date (column) = &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;DateCurrent&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries[start injury]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries[Player]&lt;/SPAN&gt;&lt;SPAN&gt; ) , &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries&lt;/SPAN&gt;&lt;SPAN&gt; ) , &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TabInjuries[Start injury]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;DateCurrent&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries[End injury]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;DateCurrent&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;TabInjuries[End injury]&lt;/SPAN&gt;&lt;SPAN&gt; ) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN&gt;If that works on your model, do not forget to mark the post as Solved.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks and enjoy&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 19 Apr 2022 13:21:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2463648#M66828</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2022-04-19T13:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2465112#M66967</link>
      <description>&lt;P&gt;Tried both options, but it does not seem to replicate what I did in Excel. It seems to have too much deviations up and down (long injury does not count for the whole period). Maybe since the data is only added for any 'start of injury', but I am not sure. On the other side, since there are new injuries every week this should not make much of a difference&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I uploaded a bigger dataset, also suggested by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="120362" data-lia-user-login="AilleryO" class="lia-mention lia-mention-user"&gt;AilleryO&lt;/a&gt;&amp;nbsp; (not all true values, but it should provide enough data and 'real' information). &lt;A href="https://docs.google.com/spreadsheets/d/1Ix-l39RsnfMIm4HewdadZSff-V_9Uf-P/edit?usp=sharing&amp;amp;ouid=106098083061178971513&amp;amp;rtpof=true&amp;amp;sd=true" target="_blank" rel="noopener"&gt;Docs Spreadsheet&lt;/A&gt;&amp;nbsp;(If I missed any private settings, please let me know&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 07:55:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2465112#M66967</guid>
      <dc:creator>Maestro</dc:creator>
      <dc:date>2022-04-20T07:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2465157#M66969</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="322371" data-lia-user-login="Maestro" class="lia-mention lia-mention-user"&gt;Maestro&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here is a sample file with the solution&amp;nbsp;&lt;A href="https://www.dropbox.com/t/tgnDTNTOWcYDK82x" target="_blank"&gt;https://www.dropbox.com/t/tgnDTNTOWcYDK82x&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Count Injuries = 
SUMX (
    'Date',
        SUMX (
            Blad1,
            VAR CurrentDate = 'Date'[Date]
            RETURN
                IF ( 
                    Blad1[Injury_start] &amp;lt;= CurrentDate
                        &amp;amp;&amp;amp; OR ( ISBLANK ( Blad1[Injury_end] ), Blad1[Injury_end] &amp;gt; CurrentDate ),
                    1,
                    0
                )
        )
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 08:17:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2465157#M66969</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-20T08:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Longitudinal injuries - how many players are injured at any timepoint</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2465458#M66995</link>
      <description>&lt;P&gt;I feel so stupid. I tried for 30 minutes, but never seemed to do what I wanted. At the end I only had to delete the relation between the date table and injury table... Thanks a lot for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 09:57:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Longitudinal-injuries-how-many-players-are-injured-at-any/m-p/2465458#M66995</guid>
      <dc:creator>Maestro</dc:creator>
      <dc:date>2022-04-20T09:57:26Z</dc:date>
    </item>
  </channel>
</rss>

