<?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: Sum data from another table with different aggregation of time in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Sum-data-from-another-table-with-different-aggregation-of-time/m-p/3119071#M41624</link>
    <description>&lt;P&gt;Thank you, this worked!&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2023 14:14:56 GMT</pubDate>
    <dc:creator>dmartiprev</dc:creator>
    <dc:date>2023-03-08T14:14:56Z</dc:date>
    <item>
      <title>Sum data from another table with different aggregation of time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sum-data-from-another-table-with-different-aggregation-of-time/m-p/3114206#M41579</link>
      <description>&lt;P&gt;I have two tables: DailyData and MonthlyData.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the DailyData table, I have columns: "Date", "YrMo" which is shows the year and month that the Date resides in, and I have a third column of data called "Sales".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the MonthlyData table I only have one column "YrMo".&amp;nbsp; I would like to sum all the Sales data from the DailyData table into the MonthlyData table by matching the YrMo column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to make this both as a column and as a measure and neither seems to work:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MonthlySalesTotal = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(DailyData&lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;),DailyData&lt;/SPAN&gt;&lt;SPAN&gt;[YrMo]&lt;/SPAN&gt;&lt;SPAN&gt;=MonthlyData&lt;/SPAN&gt;&lt;SPAN&gt;[YrMo]&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Power BI doesn't seem to recognize the MonthlyData[YrMo].&amp;nbsp; I am getting a message that says "This expression contains columns from multiple tables, but only columns from a single table can be used in a True/False expression that is used as a table filter expression"&amp;nbsp; there is only be one table called DailyData with a column called "YrMo" and only one table called MonthlyData with a column called "YrMo".&amp;nbsp; Although, it is true that within the DailyData table there are multiple rows with the same YrMo since all dates that are within one month of time will have the same YrMo by design.&amp;nbsp; I thought this is how i could use the calculation function to aggregate to monthly table but maybe this is the cause for the error?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 07 Mar 2023 07:47:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sum-data-from-another-table-with-different-aggregation-of-time/m-p/3114206#M41579</guid>
      <dc:creator>dmartiprev</dc:creator>
      <dc:date>2023-03-07T07:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sum data from another table with different aggregation of time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sum-data-from-another-table-with-different-aggregation-of-time/m-p/3117700#M41607</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/359525"&gt;@dmartiprev&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, I have creeated a simple sample:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vjianbolimsft_4-1678240480712.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/882891iF66244B307305280/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vjianbolimsft_4-1678240480712.png" alt="vjianbolimsft_4-1678240480712.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vjianbolimsft_3-1678240376416.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/882888iE2B54DB62A8F1560/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vjianbolimsft_3-1678240376416.png" alt="vjianbolimsft_3-1678240376416.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you need a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE(SUM(DailyData[Sales]),FILTER(ALL(DailyData),[YrMo]=MAX('MonthlyData'[YrMo])))&lt;/LI-CODE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vjianbolimsft_5-1678240513889.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/882892iC8AC5F4AB1DB3178/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vjianbolimsft_5-1678240513889.png" alt="vjianbolimsft_5-1678240513889.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you need a column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = SUMX(FILTER('DailyData',[YrMo]=EARLIER(MonthlyData[YrMo])),[Sales])&lt;/LI-CODE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vjianbolimsft_6-1678240580794.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/882893i818087A26B00CE8D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vjianbolimsft_6-1678240580794.png" alt="vjianbolimsft_6-1678240580794.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Jianbo Li&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:57:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sum-data-from-another-table-with-different-aggregation-of-time/m-p/3117700#M41607</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2023-03-08T01:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum data from another table with different aggregation of time</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sum-data-from-another-table-with-different-aggregation-of-time/m-p/3119071#M41624</link>
      <description>&lt;P&gt;Thank you, this worked!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 14:14:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sum-data-from-another-table-with-different-aggregation-of-time/m-p/3119071#M41624</guid>
      <dc:creator>dmartiprev</dc:creator>
      <dc:date>2023-03-08T14:14:56Z</dc:date>
    </item>
  </channel>
</rss>

