<?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: Need help writing DAX fnction that picks up values entered within a full calendar week &amp;quot;N Weeks Ago&amp;quot; in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859754#M92061</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to complete the solution of&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;, this will work if you have a column with cumulative week numbers.&lt;/P&gt;
&lt;P&gt;Otheriwse this might not work, if Week number is 45, minus 64 makes a negative number not a week num from the previous year.&lt;/P&gt;
&lt;P&gt;But you create a column in your date table with cumulative week numbers, it should work.&lt;/P&gt;
&lt;P&gt;Hope it helps&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2022 17:24:08 GMT</pubDate>
    <dc:creator>AilleryO</dc:creator>
    <dc:date>2022-10-24T17:24:08Z</dc:date>
    <item>
      <title>Need help writing DAX fnction that picks up values entered within a full calendar week "N Weeks Ago"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859506#M92038</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I need to write a dax function that searches for entries made accross a specified number of calendar weeks ago.&lt;/P&gt;&lt;P&gt;For example, how do I pick up data entered on the week that happened 64 weeks ago (or on a week 77 weeks ago, etc). \&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if today is 10/24/2022, the "week 64 weeks ago" would pick up any entry that occurred from "08/01/2021 to 08/07/2021" (or within the full calendar week 64 weeks ago).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to dax, so any input would be appreciated. Ideally the "64" shoyuld be a variable, because I want to vary it and create multiple dashboards with different values for "Data for the full calendare week N Weeks Ago". Thank You!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 15:08:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859506#M92038</guid>
      <dc:creator>E12345</dc:creator>
      <dc:date>2022-10-24T15:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help writing DAX fnction that picks up values entered within a full calendar week "N Weeks Ago"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859645#M92047</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="395018" data-lia-user-login="E12345" class="lia-mention lia-mention-user"&gt;E12345&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can place the following measure in the filter pane, select "is not blank" then apply the filter&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;FilterMeasure =
VAR WeekShift = 64 -- can be a parameter 
VAR CurrentWeek =
    MAX ( 'Date'[Week Number] )
RETURN
    COUNTROWS (
        CALCULATETABLE (
            'Table',
            REMOVEFILTERS ( 'Date' ),
            'Date'[Week Number] = CurrentWeek - WeekShift
        )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 24 Oct 2022 16:07:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859645#M92047</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-10-24T16:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help writing DAX fnction that picks up values entered within a full calendar week "N Weeks Ago"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859754#M92061</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to complete the solution of&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;, this will work if you have a column with cumulative week numbers.&lt;/P&gt;
&lt;P&gt;Otheriwse this might not work, if Week number is 45, minus 64 makes a negative number not a week num from the previous year.&lt;/P&gt;
&lt;P&gt;But you create a column in your date table with cumulative week numbers, it should work.&lt;/P&gt;
&lt;P&gt;Hope it helps&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 17:24:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859754#M92061</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2022-10-24T17:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help writing DAX fnction that picks up values entered within a full calendar week "N Weeks Ago"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859770#M92063</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="120362" data-lia-user-login="AilleryO" class="lia-mention lia-mention-user"&gt;AilleryO&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are absolutely right!&lt;/P&gt;
&lt;P&gt;ccan be amended as follows&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;FilterMeasure =
VAR WeekShift = 64 -- can be a parameter 
VAR CurrentDate =
    MAX ( 'Date'[Date] )
RETURN
    COUNTROWS (
        CALCULATETABLE (
            'Table',
            REMOVEFILTERS ( 'Date' ),
            'Date'[Date] &amp;gt;= CurrentDate - WeekShift * 7,
            'Date'[Date] &amp;lt; CurrentDate - WeekShift * 6
        )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 24 Oct 2022 17:35:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859770#M92063</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-10-24T17:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help writing DAX fnction that picks up values entered within a full calendar week "N Weeks Ago"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859786#M92067</link>
      <description>&lt;P&gt;Even better and easier than my cumulative column &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 17:50:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/2859786#M92067</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2022-10-24T17:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help writing DAX fnction that picks up values entered within a full calendar week "N Weeks Ago"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/3072655#M106724</link>
      <description>&lt;P&gt;Great idea, thank you! My problem is - we do not have a calendar table in the system and we are not allowed to create our own tables... So, will wait until I can use this code (until we have a calendar table in place).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 17:25:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-DAX-fnction-that-picks-up-values-entered/m-p/3072655#M106724</guid>
      <dc:creator>E12345</dc:creator>
      <dc:date>2023-02-09T17:25:31Z</dc:date>
    </item>
  </channel>
</rss>

