<?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: totals in rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741266#M2271</link>
    <description>&lt;P&gt;Everything is possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AmtWithFlagX = -- this is a calculated column, not a measure
var __currentKey = T[Key]
var __currentMaterial = T[Material]
var __sumWithFlagX =
	SUMX(
		filter(
			T,
			T[Material] = __currentMaterial,
			T[Key] = __currentKey,
			T[Flag] = "X"
		),
		T[Amt]
	)
return
	__sumWithFlagX&lt;/PRE&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2019 15:27:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-07-16T15:27:41Z</dc:date>
    <item>
      <title>totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741251#M2270</link>
      <description>&lt;P&gt;Hi, I'm searching for an performant solution for the following problem:&lt;BR /&gt;&lt;BR /&gt;Key&amp;nbsp; &amp;nbsp; &amp;nbsp; Material&amp;nbsp; &amp;nbsp; Component&amp;nbsp; &amp;nbsp;Amt&amp;nbsp; &amp;nbsp; Flag&amp;nbsp; Sum&lt;BR /&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;400&lt;BR /&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 400&lt;BR /&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300&amp;nbsp; &amp;nbsp; &amp;nbsp;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;400&lt;BR /&gt;&lt;BR /&gt;I would like to sum the amount of all components with Flag = 'X'. And the value should be available in each row. I that possible?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:05:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741251#M2270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-16T15:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741266#M2271</link>
      <description>&lt;P&gt;Everything is possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AmtWithFlagX = -- this is a calculated column, not a measure
var __currentKey = T[Key]
var __currentMaterial = T[Material]
var __sumWithFlagX =
	SUMX(
		filter(
			T,
			T[Material] = __currentMaterial,
			T[Key] = __currentKey,
			T[Flag] = "X"
		),
		T[Amt]
	)
return
	__sumWithFlagX&lt;/PRE&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:27:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741266#M2271</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-16T15:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741267#M2272</link>
      <description>&lt;PRE&gt;Column = CALCULATE(SUM(Table1[amt] ), ALL(Table1), Table1[flag] = "X")&lt;/PRE&gt;&lt;P&gt;Add a column like the above&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:27:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741267#M2272</guid>
      <dc:creator>HotChilli</dc:creator>
      <dc:date>2019-07-16T15:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741270#M2273</link>
      <description>&lt;P&gt;thanks for the reponse. My problem is not the filter, but to get the sum in all of the rows. I will try the solutions&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:30:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741270#M2273</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-16T15:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741273#M2274</link>
      <description>&lt;P&gt;If your table is really big, the solution by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81111" data-lia-user-login="HotChilli" class="lia-mention lia-mention-user"&gt;HotChilli&lt;/a&gt;&amp;nbsp;will be agonizingly slow due to the number of context transitions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:32:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741273#M2274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-16T15:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741293#M2281</link>
      <description>&lt;P&gt;This is working fine. The next step will be to simulate the flag. That means that for one of the components the "X" should be not "X". For this I created a filter for the users. When they select for example the first component, the sum should be different as before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;ComponentSimulate&lt;/U&gt;&lt;BR /&gt;&lt;STRONG&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Key&amp;nbsp; &amp;nbsp; &amp;nbsp; Material&amp;nbsp; &amp;nbsp; Component&amp;nbsp; &amp;nbsp;Amt&amp;nbsp; &amp;nbsp; Flag&amp;nbsp; Sum&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp;__&amp;nbsp; &amp;nbsp; &amp;nbsp; 300&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200&amp;nbsp; &amp;nbsp; &amp;nbsp;__&amp;nbsp; &amp;nbsp; &amp;nbsp; 300&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300&amp;nbsp; &amp;nbsp; &amp;nbsp;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;300&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:45:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741293#M2281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-16T15:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741314#M2284</link>
      <description>&lt;P&gt;Mate, it's not a column you needed but a measure... &lt;STRONG&gt;A COLUMN ONCE CALCULATED IN DAX CANNOT BE CHANGED.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81111" data-lia-user-login="HotChilli" class="lia-mention lia-mention-user"&gt;HotChilli&lt;/a&gt;&amp;nbsp;deal with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 16:07:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741314#M2284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-16T16:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741320#M2287</link>
      <description>&lt;P&gt;my idea was to do it with filtering:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;… in my words: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if flag = X and material &amp;lt;&amp;gt;&amp;nbsp;ComponentSimulate then sum(Amt)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;ComponentSimulate&lt;/U&gt;&lt;BR /&gt;&lt;STRONG&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;&lt;BR /&gt;Key&amp;nbsp; &amp;nbsp; &amp;nbsp; Material&amp;nbsp; &amp;nbsp; Component&amp;nbsp; &amp;nbsp;Amt&amp;nbsp; &amp;nbsp; Flag&amp;nbsp; Sum&lt;BR /&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;300&lt;BR /&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;300&lt;BR /&gt;4444&amp;nbsp; &amp;nbsp; 111&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300&amp;nbsp; &amp;nbsp; &amp;nbsp;X&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;300&lt;BR /&gt;&lt;BR /&gt;... but I have problems to see the 300 in every row (as total it is working!!!)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 16:18:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/741320#M2287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-16T16:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/742065#M2308</link>
      <description>&lt;P&gt;any idea?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 10:23:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/742065#M2308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-17T10:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: totals in rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/748407#M2601</link>
      <description>&lt;P&gt;Mate, nobody wants to help you because nobody really understands what you want... When you post a question, you have to be maximally clear about your intentions and the outcome. Otherwise, you won't get any replies. Easy as that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 00:26:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/totals-in-rows/m-p/748407#M2601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-25T00:26:32Z</dc:date>
    </item>
  </channel>
</rss>

