<?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: PowerBI - salary historic in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-salary-historic/m-p/911272#M8708</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A title="" href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/47181" target="_self"&gt;&lt;SPAN class=""&gt;Fábio,&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I fail to see why the should be&amp;nbsp;&lt;SPAN&gt;2,674.08 until 07/01/17, there is an entry in the table at 1/4/2018 were the value is 2,633.04.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Also there are duplicate dates in the history table. Is that really the case, and if so, how do you want to deal with it.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;If it is not the case the following measure should give you your result:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;r1 = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var CurrentPeriod = max('Dcalendario'[Date])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sumx(topn(1, filter('Historico_salary', 'Historico_salary'[DTMUDANCA]&amp;lt;CurrentPeriod), 'Historico_salary'[DTMUDANCA].[Date],DESC ), 'Historico_salary'[SALARIO])&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Jan&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 24 Jan 2020 20:46:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-24T20:46:14Z</dc:date>
    <item>
      <title>PowerBI - salary historic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-salary-historic/m-p/911235#M8706</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;I have a problem that I am not able to solve, I need to show the employee's salary in a pipeline, but the salary adjustments only occur in some periods of the year. but it is necessary to show me the most recent to date of the filter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In the month less than April 04/19 the value must be 2,674.08 until 07/01/17, then 2,633.04 until 08/17 etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/drive/folders/1LbKVnWinpoOjT8Fi6KTSqOPdyi62Iywk?usp=sharing" target="_blank"&gt;https://drive.google.com/drive/folders/1LbKVnWinpoOjT8Fi6KTSqOPdyi62Iywk?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 19:54:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-salary-historic/m-p/911235#M8706</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-24T19:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBI - salary historic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-salary-historic/m-p/911272#M8708</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A title="" href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/47181" target="_self"&gt;&lt;SPAN class=""&gt;Fábio,&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I fail to see why the should be&amp;nbsp;&lt;SPAN&gt;2,674.08 until 07/01/17, there is an entry in the table at 1/4/2018 were the value is 2,633.04.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Also there are duplicate dates in the history table. Is that really the case, and if so, how do you want to deal with it.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;If it is not the case the following measure should give you your result:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;r1 = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var CurrentPeriod = max('Dcalendario'[Date])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sumx(topn(1, filter('Historico_salary', 'Historico_salary'[DTMUDANCA]&amp;lt;CurrentPeriod), 'Historico_salary'[DTMUDANCA].[Date],DESC ), 'Historico_salary'[SALARIO])&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Jan&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Jan 2020 20:46:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-salary-historic/m-p/911272#M8708</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-24T20:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBI - salary historic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-salary-historic/m-p/912439#M8749</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;In the original data model I have the date and time in the column, so I will always return the most recent one.&lt;/P&gt;&lt;P&gt;Your measure met perfectly. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 14:11:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PowerBI-salary-historic/m-p/912439#M8749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-27T14:11:07Z</dc:date>
    </item>
  </channel>
</rss>

