<?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: Calculate / Flag 12 consecutive days in a 14 day period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081224#M162011</link>
    <description>&lt;P&gt;Hi Banu,&lt;/P&gt;&lt;P&gt;The formula works but the output seems wrong - is it because my data is missing dates to show a full date range?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example the individual below shows red flag present on 31, 1, 2, 3 - but the individual didn't work more than 12 days in a 14 day period&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2024 12:23:35 GMT</pubDate>
    <dc:creator>micpete</dc:creator>
    <dc:date>2024-08-05T12:23:35Z</dc:date>
    <item>
      <title>Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4080868#M161996</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a database of operatives that work at our site, they come onto site and we can see what days they have come onto site - I need to work out if they have come onto site 12 days in a row within a 14 day period then mark that as a red flag / indicator, how can I do this - this is the information I have below: operative ID is the ID of the individual, the date is when they came on site (this is just dummy data, the table is far more extensive with site name etc):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Operative ID&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;02-Sep-22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;03-Aug-24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;17-Jul-24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;02-Feb-23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;22-Oct-23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;02-Dec-23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;17-Jun-21&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 05 Aug 2024 10:01:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4080868#M161996</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-05T10:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4080949#M161998</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="728113" data-lia-user-login="micpete" class="lia-mention lia-mention-user"&gt;micpete&lt;/a&gt;&amp;nbsp;, You can create a calulated column using&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ConsecutiveDaysFlag = &lt;BR /&gt;VAR CurrentOperative = 'Table'[Operative ID]&lt;BR /&gt;VAR CurrentDate = 'Table'[Date]&lt;BR /&gt;VAR DateRange = &lt;BR /&gt;FILTER(&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Operative ID] = CurrentOperative &amp;amp;&amp;amp;&lt;BR /&gt;'Table'[Date] &amp;gt;= CurrentDate - 13 &amp;amp;&amp;amp;&lt;BR /&gt;'Table'[Date] &amp;lt;= CurrentDate&lt;BR /&gt;)&lt;BR /&gt;VAR ConsecutiveDays = &lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;DateRange,&lt;BR /&gt;DATEDIFF(&lt;BR /&gt;MINX(DateRange, [Date]),&lt;BR /&gt;[Date],&lt;BR /&gt;DAY&lt;BR /&gt;) &amp;lt;= 13&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF(ConsecutiveDays &amp;gt;= 12, "Red Flag", "No Flag")&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 10:21:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4080949#M161998</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-08-05T10:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081224#M162011</link>
      <description>&lt;P&gt;Hi Banu,&lt;/P&gt;&lt;P&gt;The formula works but the output seems wrong - is it because my data is missing dates to show a full date range?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example the individual below shows red flag present on 31, 1, 2, 3 - but the individual didn't work more than 12 days in a 14 day period&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 12:23:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081224#M162011</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-05T12:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081343#M162016</link>
      <description>&lt;P&gt;So would there be a multiple date entries for every individual operative ID that comes to site ?&lt;BR /&gt;&lt;BR /&gt;For example : OperativeID &amp;gt;&amp;gt;1&amp;nbsp;&lt;BR /&gt;would have entries like&amp;nbsp;&lt;BR /&gt;02-Sep-22&lt;BR /&gt;03-Sep-22&lt;BR /&gt;04-Sep-22&lt;BR /&gt;05-Sep-22&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 13:11:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081343#M162016</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-08-05T13:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081358#M162017</link>
      <description>&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;Yes that is correct.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 13:18:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081358#M162017</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-05T13:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081400#M162019</link>
      <description>&lt;P&gt;Hi Pete, Do you have a Date table ?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 13:30:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4081400#M162019</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-08-05T13:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4083326#M162085</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="728113" data-lia-user-login="micpete" class="lia-mention lia-mention-user"&gt;micpete&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you define these 14 days, for example, July 1 and July 13 as a period or can July 2 also be a period with July 14. Please provide sample data as well as expected results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Scott Chang&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 06:45:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4083326#M162085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-06T06:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084424#M162111</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if an individual comes onto site on from July 1 to July 14 with no day off so comes everyday, then that person needs to be marked as red because they've been to site more than 12 days with no days off.&lt;/P&gt;&lt;P&gt;If an individual comes to site for only 12 days from July 1st to July 14 that person has done 12 or less days between that period and have no flag.&lt;/P&gt;&lt;P&gt;The 14 day period can start from any day of the month or even roll onto the next month - it doesn't matter when the 14 day period starts, what matters is that they are only doing no more than 12 days within that 14 day period.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 14:21:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084424#M162111</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-06T14:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084427#M162113</link>
      <description>&lt;P&gt;I do yes, I have a date table that has a many to one relationship with the operative ID table&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 14:22:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084427#M162113</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-06T14:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084470#M162118</link>
      <description>&lt;P&gt;This is how I've put it in&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 14:34:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084470#M162118</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-06T14:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084532#M162120</link>
      <description>&lt;P&gt;I think if the count of the day reaches 13 / 14 then I want to flag it as red basically, the count goes back a day when there is a day missing and if the count goes over 14 then it resets to 1 again and the period starts over.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:01:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084532#M162120</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-06T15:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084533#M162121</link>
      <description>&lt;P&gt;I think if the count of the day reaches 13 / 14 then I want to flag it as red basically, the count goes back a day when there is a day missing and if the count goes over 14 then it resets to 1 again and the period starts over.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:01:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084533#M162121</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-06T15:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084534#M162122</link>
      <description>&lt;P&gt;I think if the count of the day reaches 13 / 14 then I want to flag it as red basically, the count goes back a day when there is a day missing and if the count goes over 14 then it resets to 1 again and the period starts over.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:01:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4084534#M162122</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-06T15:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4095611#M162527</link>
      <description>&lt;P&gt;Hi Banu,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to come back here, in the image I have attached to this, you can see that this individual worked from Jan 1st to 4th, then 9th to 12th - however he was awat on the 5th, 6th 7th , 8th. Then away again 13th, 14th - which means he did not work more than 12 days within those 14 days and so he shouldn't flag as red&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 14:02:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4095611#M162527</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-12T14:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4106759#M162967</link>
      <description>&lt;P&gt;Hi Banu,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd thought I'd try again, I can see that in my data because an individual might have come to site more than once on a given day, it counts each visit in the final result, so for example below I can see that an individual has entered site 3 times on the 17th June, so it has counted the days 3 times plus the 14th and 15th, I only want it to count it once, so if they've been on site on the 17th June at least once, then that is only one day, not three. Is this possible to do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Mon, 19 Aug 2024 11:13:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4106759#M162967</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-19T11:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate / Flag 12 consecutive days in a 14 day period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4109099#M163058</link>
      <description>&lt;P&gt;Is anyone able to help me? I've been stuck on this for too long please?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 11:52:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Flag-12-consecutive-days-in-a-14-day-period/m-p/4109099#M163058</guid>
      <dc:creator>micpete</dc:creator>
      <dc:date>2024-08-20T11:52:36Z</dc:date>
    </item>
  </channel>
</rss>

