<?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: Allocating Number of Days out the their respective week periods in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1913027#M41370</link>
    <description>&lt;P&gt;It's a great start, thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed where the data added up correctly, yet I'm seeing some discrepencies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example, the location total is correct, yet when looking at fiscal month for within a fiscal year matrix the numbers don't add up.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When looking back previous years, the variance increases and it's always lower than the actual. I'd expect any the distributed value to be higher due to carry over.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I renamed the measure you provided as Dist Days Away&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, 21 Jun 2021 19:25:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-06-21T19:25:43Z</dc:date>
    <item>
      <title>Allocating Number of Days out the their respective week periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1912534#M41354</link>
      <description>&lt;P&gt;Here's what I'm trying to work through.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I injury data where I have the occurance date and the number of days away from work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e. Occurance Date: 1/1/2020, Days Away: 54&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to allocate the number of days out their respective weeks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've not been successfull to this point and am open to suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 14:43:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1912534#M41354</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-21T14:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating Number of Days out the their respective week periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1912729#M41356</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your request is&amp;nbsp; a bit vague. It would help if you can show some sample input data and, especially, &lt;STRONG&gt;the exact output you want for it&lt;/STRONG&gt;.&amp;nbsp; Do you want the results in a table with all the weeks? How exactly? In a visual? How? other options?&lt;/P&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 style="color: #ffffff;"&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 style="color: #ffffff;"&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>Mon, 21 Jun 2021 15:58:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1912729#M41356</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2021-06-21T15:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating Number of Days out the their respective week periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1912794#M41359</link>
      <description>&lt;P&gt;Original Data&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Case Number&lt;/TD&gt;&lt;TD&gt;Location&lt;/TD&gt;&lt;TD&gt;Occurance Date&lt;/TD&gt;&lt;TD&gt;Days Out of Work&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;1/1/2020&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;1/20/2020&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;2/2/2020&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;2/15/2020&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;2/15/2020&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output&lt;/P&gt;&lt;P&gt;Assumptions:&lt;/P&gt;&lt;P&gt;Fiscal Year Starts: 1/1/2020&lt;/P&gt;&lt;P&gt;Fiscal Week Starts: 1/1/2020&lt;/P&gt;&lt;P&gt;*I'm using a fiscal date table in my data model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Week Number&lt;/TD&gt;&lt;TD&gt;Location&lt;/TD&gt;&lt;TD&gt;Days Away&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD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t;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 21 Jun 2021 16:34:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1912794#M41359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-21T16:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating Number of Days out the their respective week periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1912917#M41365</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the attached file for a possible solutions. I am not getting the same results as the output you show. You might have to tweak the DateT table to have the exact weekn numbers you need.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Days away = 
VAR auxT_ =
    ADDCOLUMNS (
        SUMMARIZE (
            Table1,
            Table1[Case Number],
            Table1[Occurance Date],
            Table1[Days Out of Work]
        ),
        "@res",
            VAR daysOut_ =
                DATESBETWEEN (
                    DateT[Date],
                    [Occurance Date],
                    [Occurance Date] + [Days Out of Work] - 1
                )
            VAR daysInWeek_ =
                DISTINCT ( DateT[Date] )
            RETURN
                COUNTROWS ( INTERSECT ( daysOut_, daysInWeek_ ) )
    )
RETURN
    SUMX ( auxT_, [@res] ) + 0&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 style="color: #ffffff;"&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 style="color: #ffffff;"&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>Mon, 21 Jun 2021 17:49:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1912917#M41365</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2021-06-21T17:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating Number of Days out the their respective week periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1913027#M41370</link>
      <description>&lt;P&gt;It's a great start, thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed where the data added up correctly, yet I'm seeing some discrepencies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example, the location total is correct, yet when looking at fiscal month for within a fiscal year matrix the numbers don't add up.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When looking back previous years, the variance increases and it's always lower than the actual. I'd expect any the distributed value to be higher due to carry over.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I renamed the measure you provided as Dist Days Away&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, 21 Jun 2021 19:25:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Allocating-Number-of-Days-out-the-their-respective-week-periods/m-p/1913027#M41370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-21T19:25:43Z</dc:date>
    </item>
  </channel>
</rss>

