<?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: Distribute Value to ratio and date offset in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3700048#M143896</link>
    <description>&lt;P&gt;That turned out to be surprisingly simple.&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>Thu, 15 Feb 2024 02:29:26 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-02-15T02:29:26Z</dc:date>
    <item>
      <title>Distribute Value to ratio and date offset</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3699664#M143888</link>
      <description>&lt;P&gt;Hello together,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table1 containing Value and DueDate.&lt;/P&gt;&lt;P&gt;Additionally I have a table2 which gives me some offsets and ratios e.g.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;OffsetDays&lt;/TD&gt;&lt;TD&gt;Ratio&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;60%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would like to distribute my value to 60% on the due date 20% 20 days after the due date and another 20% 40 days after the due date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I am not using Power BI but Excel I can't create a calculated table and since I want to apply this logic to multiple tables it would be great if this could be solved with a DAX measure instead of merging and expanding in M.&lt;BR /&gt;&lt;BR /&gt;I hope someone has a suitable solution.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 20:31:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3699664#M143888</guid>
      <dc:creator>PD_FKL</dc:creator>
      <dc:date>2024-02-14T20:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute Value to ratio and date offset</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3700048#M143896</link>
      <description>&lt;P&gt;That turned out to be surprisingly simple.&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>Thu, 15 Feb 2024 02:29:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3700048#M143896</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-15T02:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute Value to ratio and date offset</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3701280#M143942</link>
      <description>&lt;P&gt;Thanks for pointing me in the right direction.&lt;BR /&gt;&lt;BR /&gt;I had to convert it to a Crossjoin since Excel was giving me a context error, in Power BI it works smoothly.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Phasing2:=VAR a = 
//https://dax.guide/summarizecolumns/
Filter(
	ADDCOLUMNS(
		CROSSJOIN(
			VALUES( Calendar[Date] );
			Dates; 
			Facts
		);
		"Amount"; If( [Date] = [DueDate] + [Offset]; [Value] * [Ratio] )
	);
	NOT( ISBLANK( [Amount] ) )
)
//SUMMARIZECOLUMNS( Calendar[Date];Facts[DueDate];Facts[Value];Dates[Offset];Dates[Ratio])
//VAR b= ADDCOLUMNS( a; "amt"; IF(Calendar[Date] = Facts[DueDate] + [Offset]; [Value] * [Ratio]))
RETURN
SUMX( a; [Amount])&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Feb 2024 12:57:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3701280#M143942</guid>
      <dc:creator>PD_FKL</dc:creator>
      <dc:date>2024-02-15T12:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Distribute Value to ratio and date offset</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3701365#M143952</link>
      <description>&lt;P&gt;Yes, my use of SUMMARIZECOLUMNS was a bit, uhm, lazy.&amp;nbsp; Could have done a cross join from the get-go. Same idea.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 13:34:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distribute-Value-to-ratio-and-date-offset/m-p/3701365#M143952</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-15T13:34:28Z</dc:date>
    </item>
  </channel>
</rss>

