<?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: 7 Day Running Total and other DAX measures keeps returning an error in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2817285#M89372</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got inspiration from your colleague Sam McKay (Enterprise DNA) with regards to calculating previous week sales:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This time I even used DaxFormatter to make sure nothing was missed, and the formatting came out fine, but i still got this error in PowerBI. Couldn't really figure out what the issue is. Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PreviousWeekSales =&lt;BR /&gt;VAR CurrentWeek =&lt;BR /&gt;SELECTEDVALUE ( 'Date'[Week Number] )&lt;BR /&gt;VAR CurrentYear =&lt;BR /&gt;SELECTEDVALUE ( 'Date'[Year] )&lt;BR /&gt;VAR MaxWeekNumber =&lt;BR /&gt;CALCULATE ( MAX ( 'Date'[Week Number] ), ALL ( 'Date' ) )&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX (&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'Date' ),&lt;BR /&gt;IF (&lt;BR /&gt;CurrentWeek = 1,&lt;BR /&gt;Date[Week Number] = MaxWeekNumber&lt;BR /&gt;&amp;amp;&amp;amp; 'Date'[Year] = CurrentYear - 1,&lt;BR /&gt;Date[Week Number] = CurrentWeek - 1&lt;BR /&gt;&amp;amp;&amp;amp; 'Date'[Year] = CurrentYear&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;[SalesValue]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 14:41:15 GMT</pubDate>
    <dc:creator>MacJasem</dc:creator>
    <dc:date>2022-10-04T14:41:15Z</dc:date>
    <item>
      <title>7 Day Running Total and other DAX measures keeps returning an error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2805478#M88447</link>
      <description>&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've experienced that I seem to have an issue with writing Dax measures. I keep getting errors when refering to table Columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am i doing wrong? is there a setting that i have to change somewhere?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;7DayRunningTotal = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;[SalesValue]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;) - &lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;as I find inspiration from other Dax measures shared on the net I see the reference to Tables is different in my case with the '' around the table, whereas I dont see this in other peoples DAX examples.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Sep 2022 08:36:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2805478#M88447</guid>
      <dc:creator>MacJasem</dc:creator>
      <dc:date>2022-09-29T08:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: 7 Day Running Total and other DAX measures keeps returning an error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2805556#M88454</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="437928" data-lia-user-login="MacJasem" class="lia-mention lia-mention-user"&gt;MacJasem&lt;/a&gt;&amp;nbsp;Missed a closing paren:&amp;nbsp;ALL('Date'),&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;7DayRunningTotal = 
CALCULATE( 
  [SalesValue],
  FILTER(
    ALL('Date'), 
    'Date'[Date] &amp;gt; MAX('Date'[Date]) - 7 &amp;amp;&amp;amp; 'Date'[Date] &amp;lt;= MAX('Date'[Date])
  )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 08:55:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2805556#M88454</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-09-29T08:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: 7 Day Running Total and other DAX measures keeps returning an error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2805775#M88477</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; Overthought that one without checking the formating - how embarrasing &lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;, much appreciated the swift reply!&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 09:33:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2805775#M88477</guid>
      <dc:creator>MacJasem</dc:creator>
      <dc:date>2022-09-29T09:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: 7 Day Running Total and other DAX measures keeps returning an error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2805786#M88479</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="437928" data-lia-user-login="MacJasem" class="lia-mention lia-mention-user"&gt;MacJasem&lt;/a&gt;&amp;nbsp;Happens!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 09:35:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2805786#M88479</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-09-29T09:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: 7 Day Running Total and other DAX measures keeps returning an error</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2817285#M89372</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got inspiration from your colleague Sam McKay (Enterprise DNA) with regards to calculating previous week sales:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This time I even used DaxFormatter to make sure nothing was missed, and the formatting came out fine, but i still got this error in PowerBI. Couldn't really figure out what the issue is. Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PreviousWeekSales =&lt;BR /&gt;VAR CurrentWeek =&lt;BR /&gt;SELECTEDVALUE ( 'Date'[Week Number] )&lt;BR /&gt;VAR CurrentYear =&lt;BR /&gt;SELECTEDVALUE ( 'Date'[Year] )&lt;BR /&gt;VAR MaxWeekNumber =&lt;BR /&gt;CALCULATE ( MAX ( 'Date'[Week Number] ), ALL ( 'Date' ) )&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX (&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'Date' ),&lt;BR /&gt;IF (&lt;BR /&gt;CurrentWeek = 1,&lt;BR /&gt;Date[Week Number] = MaxWeekNumber&lt;BR /&gt;&amp;amp;&amp;amp; 'Date'[Year] = CurrentYear - 1,&lt;BR /&gt;Date[Week Number] = CurrentWeek - 1&lt;BR /&gt;&amp;amp;&amp;amp; 'Date'[Year] = CurrentYear&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;[SalesValue]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 14:41:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/7-Day-Running-Total-and-other-DAX-measures-keeps-returning-an/m-p/2817285#M89372</guid>
      <dc:creator>MacJasem</dc:creator>
      <dc:date>2022-10-04T14:41:15Z</dc:date>
    </item>
  </channel>
</rss>

