<?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 How to sum when filter is based on the row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3685404#M143151</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a fact table that contain:&lt;/P&gt;&lt;P&gt;- amount of sales (DC)&lt;/P&gt;&lt;P&gt;- Department&amp;nbsp; (product group)&lt;/P&gt;&lt;P&gt;- department&amp;amp;year&amp;amp;month (product group &amp;amp; FYM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a formule similer to excel sum if that doing for each row:&lt;/P&gt;&lt;P&gt;=DC/ sumof DC according to the productroup&amp;amp;FYM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for eample, I want to get in the first row = 7286/(7286+4372+5829+7286)&lt;/P&gt;&lt;P&gt;for the seconf row =&amp;nbsp;4372/(7286+4372+5829+7286)&lt;/P&gt;&lt;P&gt;for the last row = 8473/(7286+4372+8743)&lt;/P&gt;&lt;P&gt;Thx !&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2024 09:58:09 GMT</pubDate>
    <dc:creator>TomerIwanir</dc:creator>
    <dc:date>2024-02-07T09:58:09Z</dc:date>
    <item>
      <title>How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3685404#M143151</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a fact table that contain:&lt;/P&gt;&lt;P&gt;- amount of sales (DC)&lt;/P&gt;&lt;P&gt;- Department&amp;nbsp; (product group)&lt;/P&gt;&lt;P&gt;- department&amp;amp;year&amp;amp;month (product group &amp;amp; FYM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a formule similer to excel sum if that doing for each row:&lt;/P&gt;&lt;P&gt;=DC/ sumof DC according to the productroup&amp;amp;FYM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for eample, I want to get in the first row = 7286/(7286+4372+5829+7286)&lt;/P&gt;&lt;P&gt;for the seconf row =&amp;nbsp;4372/(7286+4372+5829+7286)&lt;/P&gt;&lt;P&gt;for the last row = 8473/(7286+4372+8743)&lt;/P&gt;&lt;P&gt;Thx !&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 09:58:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3685404#M143151</guid>
      <dc:creator>TomerIwanir</dc:creator>
      <dc:date>2024-02-07T09:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686086#M143178</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="686736" data-lia-user-login="TomerIwanir" class="lia-mention lia-mention-user"&gt;TomerIwanir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Nathan&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Feb 2024 15:37:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686086#M143178</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2024-02-07T15:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686216#M143185</link>
      <description>&lt;P&gt;Hi, maybe im missing here something&lt;/P&gt;&lt;P&gt;at row 8 in your explanation&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;where:&lt;/P&gt;&lt;P&gt;productgroup&amp;amp;FYM is my original column&lt;/P&gt;&lt;P&gt;Var_group =&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Invoices&lt;/SPAN&gt;&lt;SPAN&gt;[Productgroup&amp;amp; FYM]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;any idea why im getting this error?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thx again&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Feb 2024 15:59:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686216#M143185</guid>
      <dc:creator>TomerIwanir</dc:creator>
      <dc:date>2024-02-07T15:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686338#M143192</link>
      <description>&lt;P&gt;1) You need to close the REMOVEFILTERS argument with a ")" after your 'Invoices' table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INCORRECT: REMOVEFILTERS(Invoices, Invoices[Productgroup...))&lt;/P&gt;&lt;P&gt;CORRECT: REMOVEFILTERS(Invoices&lt;FONT color="#FF0000"&gt;&lt;U&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;, Invoices[Productgroup...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) You need to check where Invoices[Productgroup&amp;amp; FYM] = _CurrentGroup (which is a VAR), rather than Invoices[VAR_group], which looks like a 'table'[column].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) In the screenshot of your measure, it looks like you're just starting with the CALCULATE, rather than declaring the variables needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try to follow the same structure of the measure provided.&lt;/P&gt;&lt;P&gt;4 VARS, followed by a RETURN.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 16:45:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686338#M143192</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2024-02-07T16:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686560#M143203</link>
      <description>&lt;P&gt;yes, I build the first 3 var that u meantioned as table (column),&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure how to built VAR (im pretty new to this and im not working with SQL at all)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 18:35:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686560#M143203</guid>
      <dc:creator>TomerIwanir</dc:creator>
      <dc:date>2024-02-07T18:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686628#M143208</link>
      <description>&lt;P&gt;OK, yeah.&amp;nbsp; You don't want to create calculated columns in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You just want to create 1 single measure, and add it to your table &lt;U&gt;&lt;STRONG&gt;visual&lt;/STRONG&gt;&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's the same measure I shared originally.&lt;/P&gt;&lt;P&gt;The measure shows how to create VARs within a measure.&lt;/P&gt;&lt;P&gt;You simply use the keyword "VAR", followed by the variable name (any name you like), and then assign the variable whatever value or calculation.&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;&lt;P&gt;Please create the measure shown (with your table/column references of course) and add it to the table visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 19:47:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686628#M143208</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2024-02-07T19:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686719#M143216</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="686736" data-lia-user-login="TomerIwanir" class="lia-mention lia-mention-user"&gt;TomerIwanir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it's still not working, please share the link to the PBIX and I should hopefully be able to get it working for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that is not possible, then send me your code again, with results (or errors) as before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 21:06:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3686719#M143216</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2024-02-07T21:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3687961#M143274</link>
      <description>&lt;P&gt;Tried to create the first measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got the following error, what am I missing ??&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 09:57:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3687961#M143274</guid>
      <dc:creator>TomerIwanir</dc:creator>
      <dc:date>2024-02-08T09:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3688123#M143284</link>
      <description>&lt;P&gt;Im ok sharing it with u just not sure how to &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but we are getting closer,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;any idea whats wrong at row 3?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 11:08:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3688123#M143284</guid>
      <dc:creator>TomerIwanir</dc:creator>
      <dc:date>2024-02-08T11:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3688618#M143309</link>
      <description>&lt;P&gt;As mentioned previously....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) You (&lt;EM&gt;still&lt;/EM&gt;) need to close the REMOVEFILTERS argument with a ")" after your 'Invoices' table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INCORRECT: REMOVEFILTERS(Invoices, Invoices[Productgroup...))&lt;/P&gt;&lt;P&gt;CORRECT: REMOVEFILTERS(Invoices&lt;FONT color="#FF0000"&gt;&lt;U&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;, Invoices[Productgroup...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) You've also placed 2 close parenthesis back to back at the end of the CALCULATE.&amp;nbsp; You only need 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code....&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;&lt;P&gt;My code...&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;&lt;P&gt;NOTE: When you use functions with multiple parameters, it is easier to read &amp;amp; avoid syntax errors if you separate each parameter onto its own line.&amp;nbsp; Notice how in your code, you have the entire CALCULATE (with all 3 parameters) on one single code line.&amp;nbsp; This can make it more difficult to see where parenthesis need to match up, as well as the separation of params.&amp;nbsp; Notice how in my code, it's much easier to see these things, simply because the params are each separated onto their own lines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S.&amp;nbsp; If this does not resolve it for you, you can upload the PBIX to Google Drive, and then share the link here in this thread.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 17:01:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3688618#M143309</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2024-02-08T17:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3689238#M143346</link>
      <description>&lt;P&gt;So the formula is finally worked but something is odd with the numbers, its suppose its need to sum into 100% every customergroup &amp;amp; FYM, but as seen below, its not, did I did something wrong ? it got uo tp 85%&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 20:00:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3689238#M143346</guid>
      <dc:creator>TomerIwanir</dc:creator>
      <dc:date>2024-02-08T20:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum when filter is based on the row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3699464#M143878</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="686736" data-lia-user-login="TomerIwanir" class="lia-mention lia-mention-user"&gt;TomerIwanir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would you be able to upload the PBIX to Google Drive, and then share the link here in this thread?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Nathan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 17:32:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-sum-when-filter-is-based-on-the-row/m-p/3699464#M143878</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2024-02-14T17:32:34Z</dc:date>
    </item>
  </channel>
</rss>

