<?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: Selecting the effective Rate for a specific Time Entry Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2663319#M79043</link>
    <description>&lt;P&gt;In your second table add colnum&lt;/P&gt;&lt;P&gt;rate =&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculate(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; max(table1[Rate]),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Filter(table1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; table1[Employee Number] = table2[Employee Number] &amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; table1[date]&amp;lt;table2[date]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2022 22:18:00 GMT</pubDate>
    <dc:creator>vapid128</dc:creator>
    <dc:date>2022-07-26T22:18:00Z</dc:date>
    <item>
      <title>Selecting the effective Rate for a specific Time Entry Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2663201#M79038</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables,&amp;nbsp; Table A with effective Rates per Employees with Start Dates&amp;nbsp;&lt;SPAN&gt;and Table B with&amp;nbsp;&lt;/SPAN&gt;Time Entries per Employees&lt;SPAN&gt;.&lt;/SPAN&gt;&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;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I would like to calculate the Cost = [Duration in Hours] * [Rate] but use the effective Rate at Date time Entry.&amp;nbsp; I've been struggling with that one.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 20:55:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2663201#M79038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-26T20:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting the effective Rate for a specific Time Entry Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2663319#M79043</link>
      <description>&lt;P&gt;In your second table add colnum&lt;/P&gt;&lt;P&gt;rate =&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculate(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; max(table1[Rate]),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Filter(table1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; table1[Employee Number] = table2[Employee Number] &amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; table1[date]&amp;lt;table2[date]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 22:18:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2663319#M79043</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-07-26T22:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting the effective Rate for a specific Time Entry Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2665047#M79161</link>
      <description>&lt;P&gt;Thank you the reply.&amp;nbsp; I was working on DAX measures but this will get me started.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 13:04:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2665047#M79161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-27T13:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting the effective Rate for a specific Time Entry Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2668943#M79508</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My test table:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Table A:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table B:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Please try below measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Cost =
VAR cur_duration =
    SELECTEDVALUE ( 'Table B'[Duration in Hours] )
VAR cur_datetime =
    SELECTEDVALUE ( 'Table B'[Date time entry] )
VAR cur_num =
    SELECTEDVALUE ( 'Table B'[Employee Number] )
VAR cur_rate =
    CALCULATE (
        MAX ( 'Table A'[Rate] ),
        FILTER (
            'Table A',
            'Table A'[Employee number] = cur_num
                &amp;amp;&amp;amp; 'Table A'[Effective Start Date] &amp;lt; cur_datetime
        )
    )
RETURN
    cur_duration * cur_rate
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Binbin Yu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 08:19:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selecting-the-effective-Rate-for-a-specific-Time-Entry-Date/m-p/2668943#M79508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-29T08:19:48Z</dc:date>
    </item>
  </channel>
</rss>

