<?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 Get monthly price froma separate table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-monthly-price-froma-separate-table/m-p/2257040#M54494</link>
    <description>&lt;P&gt;Dears,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Total Hourly Cons (it contain hourly energy consumtion data)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;2. Energy Price (it contain monthly energy price):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scope is to add a colum in the first table that contain the price for the coresponding set of month &amp;amp; year, based o matching colums "date" of the first table and "month" of the second table. An many to one relationship betwen "Date" and "Month" is already established.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've already had a try with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = RELATED(EnergyPrice[Price])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it is only returning values for fixed dates (01.01.2020).&amp;nbsp;&lt;BR /&gt;Any advice?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Later edit:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added in the first table an "start of month" column" and now the&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = RELATED(EnergyPrice[Price])&lt;/LI-CODE&gt;&lt;P&gt;is providing what i need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other sollution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Dec 2021 15:35:16 GMT</pubDate>
    <dc:creator>mapet</dc:creator>
    <dc:date>2021-12-27T15:35:16Z</dc:date>
    <item>
      <title>Get monthly price froma separate table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-monthly-price-froma-separate-table/m-p/2257040#M54494</link>
      <description>&lt;P&gt;Dears,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Total Hourly Cons (it contain hourly energy consumtion data)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;2. Energy Price (it contain monthly energy price):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scope is to add a colum in the first table that contain the price for the coresponding set of month &amp;amp; year, based o matching colums "date" of the first table and "month" of the second table. An many to one relationship betwen "Date" and "Month" is already established.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've already had a try with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = RELATED(EnergyPrice[Price])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it is only returning values for fixed dates (01.01.2020).&amp;nbsp;&lt;BR /&gt;Any advice?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Later edit:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added in the first table an "start of month" column" and now the&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = RELATED(EnergyPrice[Price])&lt;/LI-CODE&gt;&lt;P&gt;is providing what i need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other sollution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 15:35:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-monthly-price-froma-separate-table/m-p/2257040#M54494</guid>
      <dc:creator>mapet</dc:creator>
      <dc:date>2021-12-27T15:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Get monthly price froma separate table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-monthly-price-froma-separate-table/m-p/2257090#M54498</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="348236" data-lia-user-login="mapet" class="lia-mention lia-mention-user"&gt;mapet&lt;/a&gt; , month seem to be using start date of the month &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a new column in table one&lt;/P&gt;
&lt;P&gt;maxx(filter(Table2, eomonth(Table2[Month],0) = eomonth(table1[Date],0)) , Table2[Price])&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 15:44:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-monthly-price-froma-separate-table/m-p/2257090#M54498</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-12-27T15:44:09Z</dc:date>
    </item>
  </channel>
</rss>

