<?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: Calculate formula not Totaling in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1722936#M35642</link>
    <description>&lt;P&gt;try this code :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rev SWLY2 =
VAR _weekid52 =
    MAX ( DateTable[WeekID] ) - 52
RETURN
    SUMX (
        VALUES ( DateTable[WeekEnding] ),
        CALCULATE (
            SUM ( 'Fact Table'[Revenue Net] ),
            FILTER ( ALL ( DateTable ), DateTable[WeekID] = _weekid52 )
        )&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 15 Mar 2021 15:04:18 GMT</pubDate>
    <dc:creator>jameszhang0805</dc:creator>
    <dc:date>2021-03-15T15:04:18Z</dc:date>
    <item>
      <title>Calculate formula not Totaling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1719490#M35551</link>
      <description>&lt;P&gt;Can anyone help me with this formula?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculate formula not totaling&amp;nbsp;&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;</description>
      <pubDate>Fri, 12 Mar 2021 18:07:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1719490#M35551</guid>
      <dc:creator>mcornfield</dc:creator>
      <dc:date>2021-03-12T18:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate formula not Totaling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1719739#M35559</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="252900" data-lia-user-login="mcornfield" class="lia-mention lia-mention-user"&gt;mcornfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this formula&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Rev SWLY2 = 
var _weekid52 = SELECTEDVALUE(DateTable[WeekID]) - 52
return
CALCULATE(SUM('Fact Table'[Revenue Net]), FILTER(ALL(DateTable), DateTable[WeekID] =_weekid52 ))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 12 Mar 2021 21:25:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1719739#M35559</guid>
      <dc:creator>themistoklis</dc:creator>
      <dc:date>2021-03-12T21:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate formula not Totaling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1719945#M35566</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="252900" data-lia-user-login="mcornfield" class="lia-mention lia-mention-user"&gt;mcornfield&lt;/a&gt;&amp;nbsp;SELECTEDVALUE only return a single value and at the grand total there are no filters so you have to use MAX or MIN like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rev =
VAR MaxDate =
    CALCULATE (
        MAX ( DateTable[WeekID] ),
        FILTER ( VALUES ( Dates[Calendar Year Number] ), [Revenue Net] &amp;lt;&amp;gt; 0 )
    )
VAR Result =
    CALCULATE (
        [Revenue Net],
        DateTable[WeekID] = MaxDate - 10,
        REMOVEFILTERS ( DateTable )
    )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 13 Mar 2021 02:46:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1719945#M35566</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2021-03-13T02:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate formula not Totaling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1722875#M35636</link>
      <description>&lt;P&gt;This gave me a total but the the wrong subtotals&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 14:26:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1722875#M35636</guid>
      <dc:creator>mcornfield</dc:creator>
      <dc:date>2021-03-15T14:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate formula not Totaling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1722879#M35638</link>
      <description>&lt;P&gt;This solution did not total either for some reason&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 14:27:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1722879#M35638</guid>
      <dc:creator>mcornfield</dc:creator>
      <dc:date>2021-03-15T14:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate formula not Totaling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1722936#M35642</link>
      <description>&lt;P&gt;try this code :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rev SWLY2 =
VAR _weekid52 =
    MAX ( DateTable[WeekID] ) - 52
RETURN
    SUMX (
        VALUES ( DateTable[WeekEnding] ),
        CALCULATE (
            SUM ( 'Fact Table'[Revenue Net] ),
            FILTER ( ALL ( DateTable ), DateTable[WeekID] = _weekid52 )
        )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Mar 2021 15:04:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1722936#M35642</guid>
      <dc:creator>jameszhang0805</dc:creator>
      <dc:date>2021-03-15T15:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate formula not Totaling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1723300#M35654</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="252900" data-lia-user-login="mcornfield" class="lia-mention lia-mention-user"&gt;mcornfield&lt;/a&gt;&amp;nbsp;, you need use SUMX and Summarize in another measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;MeasureTotal = SUMX (&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;ADDCOLUMNS (&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;SUMMARIZE ( 'Table', 'Table'[Date] ),&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;"Result", [First Measure without Total]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;),&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;[Result]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Mar 2021 18:42:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1723300#M35654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-15T18:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate formula not Totaling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1724021#M35676</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="252900" data-lia-user-login="mcornfield" class="lia-mention lia-mention-user"&gt;mcornfield&lt;/a&gt;&amp;nbsp; hmmm actually, I made a guess based on &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="61168" data-lia-user-login="themistoklis" class="lia-mention lia-mention-user"&gt;themistoklis&lt;/a&gt;&amp;nbsp; code, if none of the solutions on this page works then you have to share power bi file, also make sure going forward you provided data upfront so that it save everyone's time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 04:51:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-formula-not-Totaling/m-p/1724021#M35676</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2021-03-16T04:51:20Z</dc:date>
    </item>
  </channel>
</rss>

