<?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: Datos anteriores a una fecha in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3761723#M146771</link>
    <description>&lt;P&gt;DATEADD(xxx,-7,DAYS)&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 21:19:54 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-03-13T21:19:54Z</dc:date>
    <item>
      <title>Datos anteriores a una fecha</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3760645#M146712</link>
      <description>&lt;P&gt;Buenas... necesito saber como hacer para al elegir un intervalo de fechas (por ejemplo de una semana especifica) en el segmentador, en una tabla/matriz me salgan los valores de 1 semana antes al intervalo de fechas elegida en el segmentador. Desde ya muchas gracias, si pueden ayudarme por favor.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 12:35:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3760645#M146712</guid>
      <dc:creator>Chris03_</dc:creator>
      <dc:date>2024-03-13T12:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Datos anteriores a una fecha</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3761723#M146771</link>
      <description>&lt;P&gt;DATEADD(xxx,-7,DAYS)&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 21:19:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3761723#M146771</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-13T21:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Datos anteriores a una fecha</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3763479#M146860</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Lo intente, pero no da el resultado deseado. Busco hacer una medida, que al poner en una matriz y utilice un segmentador de fecha para elejir un intervalo de fechas (una semana) en la matriz se reflejen valores pero de 7 dias antes.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 11:56:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3763479#M146860</guid>
      <dc:creator>Chris03_</dc:creator>
      <dc:date>2024-03-14T11:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Datos anteriores a una fecha</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3763645#M146869</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 12:50:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3763645#M146869</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-14T12:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Datos anteriores a una fecha</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3767164#M147089</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;En la foto se observa los datos obtenidos al filtrar entre las fechas 17/02 y 23/02. Lo que necesito es que al realizar ese filtro, es que esa medida Peso 1 Med me de el valor pero de lo obtenido 1 semana antes es decir, del 10 al 16. El datediff no me sirvio.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 16:17:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3767164#M147089</guid>
      <dc:creator>Chris03_</dc:creator>
      <dc:date>2024-03-15T16:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Datos anteriores a una fecha</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3767171#M147090</link>
      <description>&lt;P&gt;Second request:&amp;nbsp;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 16:20:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3767171#M147090</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-15T16:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Datos anteriores a una fecha</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3785405#M147860</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="703915" data-lia-user-login="Chris03_" class="lia-mention lia-mention-user"&gt;Chris03_&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Here some steps that I want to share, you can check them if they suitable for your requirement.&lt;BR /&gt;Here is my test data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;Create a new date table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date = VALUES('Table'[Date])&lt;/LI-CODE&gt;
&lt;P&gt;Use the Date[Date] as the value of slicer&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create measures&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MaxDate = 
IF(
    SELECTEDVALUE('Table'[Date]) &amp;lt;= MAX('Date'[Date]) - 7,
    1,
    0
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;MinDate = 
IF(
    SELECTEDVALUE('Table'[Date]) &amp;gt;= MIN('Date'[Date]) -7,
    1,
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;Use Table[Date] as table value and Apply measure to filter&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If you want to change the date interval dynamically, i.e., instead of a week, you can create another measure to replace the fixed 7&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DateRange = DATEDIFF(MIN('Date'[Date]),MAX('Date'[Date]),DAY)+1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Albert He&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;EM&gt;&lt;STRONG&gt; helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; &lt;/EM&gt;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 08:28:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datos-anteriores-a-una-fecha/m-p/3785405#M147860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-22T08:28:49Z</dc:date>
    </item>
  </channel>
</rss>

