<?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 Split value over month using a distribution key - HELP in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Split-value-over-month-using-a-distribution-key-HELP/m-p/1589784#M31910</link>
    <description>&lt;P&gt;Hello everybody,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really hope you can help me with this problem, which seems pretty complicated for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;What I want to to is split the weightamount out on different month in the furture based on the expected number of hours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have following distribution key for expected hours:&amp;nbsp;&lt;BR /&gt;0-500 = 2 month&lt;/P&gt;&lt;P&gt;500-1500 = 4 month&lt;/P&gt;&lt;P&gt;1500 - 4000 = 6 month&lt;/P&gt;&lt;P&gt;4000 - above = 8 month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So forexample: in the above observation the start date is 01/05 and expected hours of 6,48 therefore weightamount should be split over 2 month -&amp;gt;&amp;nbsp; Month 5 = 2592 and Month 6 = 2592.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone who have a solution to this, or can point me in the right direction? Should i maybe create a seperate calendar table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Important note:&amp;nbsp;&lt;/STRONG&gt;If it is the first of the month then it should be allocated to that month. So for the above exapmle because it is the first of the monst (01/05) then it should be allocated to month 5 and 6, but if the start date wat 07/05 then i should have been allocated to month 6 and 7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final output should be a graph like this, so i can see how many hours we expect to have en the future:&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;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jan 2021 13:29:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-01-11T13:29:44Z</dc:date>
    <item>
      <title>Split value over month using a distribution key - HELP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Split-value-over-month-using-a-distribution-key-HELP/m-p/1589784#M31910</link>
      <description>&lt;P&gt;Hello everybody,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really hope you can help me with this problem, which seems pretty complicated for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;What I want to to is split the weightamount out on different month in the furture based on the expected number of hours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have following distribution key for expected hours:&amp;nbsp;&lt;BR /&gt;0-500 = 2 month&lt;/P&gt;&lt;P&gt;500-1500 = 4 month&lt;/P&gt;&lt;P&gt;1500 - 4000 = 6 month&lt;/P&gt;&lt;P&gt;4000 - above = 8 month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So forexample: in the above observation the start date is 01/05 and expected hours of 6,48 therefore weightamount should be split over 2 month -&amp;gt;&amp;nbsp; Month 5 = 2592 and Month 6 = 2592.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone who have a solution to this, or can point me in the right direction? Should i maybe create a seperate calendar table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Important note:&amp;nbsp;&lt;/STRONG&gt;If it is the first of the month then it should be allocated to that month. So for the above exapmle because it is the first of the monst (01/05) then it should be allocated to month 5 and 6, but if the start date wat 07/05 then i should have been allocated to month 6 and 7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final output should be a graph like this, so i can see how many hours we expect to have en the future:&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;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 13:29:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Split-value-over-month-using-a-distribution-key-HELP/m-p/1589784#M31910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-11T13:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Split value over month using a distribution key - HELP</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Split-value-over-month-using-a-distribution-key-HELP/m-p/1597863#M32018</link>
      <description>&lt;P&gt;let's start with the number of months&lt;BR /&gt;add the following table&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl63" style="height: 15.0pt; width: 48pt;"&gt;Low&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="width: 48pt;"&gt;High&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="width: 48pt;"&gt;Months&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl63" style="height: 15.0pt;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;500&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl63" style="height: 15.0pt;"&gt;500&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;1500&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl63" style="height: 15.0pt;"&gt;1500&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;4000&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl63" style="height: 15.0pt;"&gt;4000&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;99999999&lt;/TD&gt;
&lt;TD align="right" class="xl63"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;and add following calculated column to your table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NrOfMonths =
VAR __expected = 'Table'[Expected Hours]
VAR __relevantSplit =
    FILTER ( 'Split', __expected &amp;gt; 'Split'[Low] &amp;amp;&amp;amp; __expected &amp;lt;= 'Split'[High] )
RETURN
    CALCULATE ( MAX ( 'Split'[Months] ), __relevantSplit )
&lt;/LI-CODE&gt;
&lt;P&gt;It should give you the expected number of months for each row. If you can add the table using M then we can also replace 99999999 with +infinity&lt;BR /&gt;&lt;BR /&gt;now for the allocation - do you want to create a calculated table, or are you looking for a measure that would assign the values to particular dates?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 19:08:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Split-value-over-month-using-a-distribution-key-HELP/m-p/1597863#M32018</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2021-01-13T19:08:09Z</dc:date>
    </item>
  </channel>
</rss>

