<?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 value from the time frame in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2661764#M81663</link>
    <description>&lt;P&gt;let&lt;BR /&gt;Source = Excel.Workbook(File.Contents("xxx"), null, true),&lt;BR /&gt;IrishWaterBill_Table = Source{[Item="zzz",Kind="Table"]}[Data],&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(IrishWaterBill_Table,{{"Billing Period Start ", type date}, {"Billing Period End ", type date}, {"Days", Int64.Type}, {"Volume - m3", type number}, {"Water standing charge rate", type number}, {"Water supplied rate", type number}, {"Wastewater standing charge", type number}, {"Wastewater removed rate", type number}, {"Water Standing charge (Days*€1.36)", type number}, {"Water supplied ", type number}, {"Wastewter standing charge (Days*€1.4445)", type number}, {"Wastewater removed ", type number}, {"Total water service charge ", type number}}),&lt;BR /&gt;#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Billing Period Start ", "Billing Period End ", "Volume - m3", "Total water service charge "}),&lt;BR /&gt;#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "Table2 Value", each List.Sum(Table.SelectRows(WaterConsumption,(x)=&amp;gt; x[Date]&amp;gt;=[#"Billing Period Start "] and x[Date]&amp;lt;=[#"Billing Period End "])[MainIncomerWater])&lt;BR /&gt;in&lt;BR /&gt;#"Added Custom"&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2022 11:04:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-26T11:04:20Z</dc:date>
    <item>
      <title>sum value from the time frame</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2655065#M81431</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have two set data one is start date and end date, second data need to sum between the start date and end date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;First Data&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Start date&lt;/TD&gt;&lt;TD&gt;End Date&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/6/2022&lt;/TD&gt;&lt;TD&gt;24/6/2022&lt;/TD&gt;&lt;TD&gt;1080&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;25/6/2022&lt;/TD&gt;&lt;TD&gt;15/7/2022&lt;/TD&gt;&lt;TD&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second Data&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/6/2022&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/6/2022&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;200&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;24/6/2022&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;28/6/2022&lt;/TD&gt;&lt;TD&gt;175&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/7/2022&lt;/TD&gt;&lt;TD&gt;181&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to sum the data 2 in the time frame in data 1 and compare the both result. How should I do or what measure should I put?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 08:05:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2655065#M81431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-22T08:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: sum value from the time frame</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2655324#M81445</link>
      <description>&lt;P&gt;See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test&lt;/P&gt;&lt;P&gt;Sample code for Table2&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Xcq5DQAgDAPAXVwTyTHvLij7rwHpEO3p9oYoGYfRUeAkojyoi/pQLWf/cCXO/uA01sTliDg=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Value", Int64.Type}})
in
    #"Changed Type"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Sample Code for Table1&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtI1MNM1MFTSgXOMTIAcQwMLA6VYHYQSI1O4EnNdQxDH0gCoIhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Start Date" = _t, #"End Date" = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Start Date", type date}, {"End Date", type date}, {"Value", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Table2 Value", each List.Sum(Table.SelectRows(Table2, (x)=&amp;gt; x[Date]&amp;gt;=[Start Date] and x[Date]&amp;lt;=[End Date])[Value]))
in
    #"Added Custom"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 22 Jul 2022 10:11:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2655324#M81445</guid>
      <dc:creator>Vijay_A_Verma</dc:creator>
      <dc:date>2022-07-22T10:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: sum value from the time frame</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2661573#M81659</link>
      <description>&lt;P&gt;Hi, for the code below, how do i change it to my own data list, like adding more value inside.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Xcq5DQAgDAPAXVwTyTHvLij7rwHpEO3p9oYoGYfRUeAkojyoi/pQLWf/cCXO/uA01sTliDg="&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 10:05:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2661573#M81659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-26T10:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: sum value from the time frame</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2661764#M81663</link>
      <description>&lt;P&gt;let&lt;BR /&gt;Source = Excel.Workbook(File.Contents("xxx"), null, true),&lt;BR /&gt;IrishWaterBill_Table = Source{[Item="zzz",Kind="Table"]}[Data],&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(IrishWaterBill_Table,{{"Billing Period Start ", type date}, {"Billing Period End ", type date}, {"Days", Int64.Type}, {"Volume - m3", type number}, {"Water standing charge rate", type number}, {"Water supplied rate", type number}, {"Wastewater standing charge", type number}, {"Wastewater removed rate", type number}, {"Water Standing charge (Days*€1.36)", type number}, {"Water supplied ", type number}, {"Wastewter standing charge (Days*€1.4445)", type number}, {"Wastewater removed ", type number}, {"Total water service charge ", type number}}),&lt;BR /&gt;#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Billing Period Start ", "Billing Period End ", "Volume - m3", "Total water service charge "}),&lt;BR /&gt;#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "Table2 Value", each List.Sum(Table.SelectRows(WaterConsumption,(x)=&amp;gt; x[Date]&amp;gt;=[#"Billing Period Start "] and x[Date]&amp;lt;=[#"Billing Period End "])[MainIncomerWater])&lt;BR /&gt;in&lt;BR /&gt;#"Added Custom"&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 11:04:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/sum-value-from-the-time-frame/m-p/2661764#M81663</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-26T11:04:20Z</dc:date>
    </item>
  </channel>
</rss>

