<?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: SUM of Column if selected value is present in another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-of-Column-if-selected-value-is-present-in-another-column/m-p/2152287#M49630</link>
    <description>&lt;P&gt;Have you considered teaching your users how to use filters?&lt;/P&gt;</description>
    <pubDate>Mon, 25 Oct 2021 02:37:38 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2021-10-25T02:37:38Z</dc:date>
    <item>
      <title>SUM of Column if selected value is present in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-of-Column-if-selected-value-is-present-in-another-column/m-p/2148694#M49478</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been fiddeling with this issue for a long time without beeing able to find a solution, maybe you can help me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here it is :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a fact table with Client, Product and Amount :&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;Also, I have dimension tables Client and Product that are related to the Fact table :&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;I want to create a measure that give me the SUM of the "Amount" for every Client that have purchased specific Products.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, if I create a slicer and select the Product 3 :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want this measure to return the SUM of "Amount" filtered with only Client A and Client C but for all the products.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case : Client A (92+3+79+47) + Client C (46+40+79+1).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is also that my Fact table is huge and I query it via DirectQuery and I cannot duplicate it with a SUMMARIZE or a GROUPBY.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do it in the calculation directly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Idealy, I would like also to select multiple products and have the measure return the SUM for Client that have Product 6 AND/OR Product 3 for instance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help,&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:30:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-of-Column-if-selected-value-is-present-in-another-column/m-p/2148694#M49478</guid>
      <dc:creator>Deckard_X42</dc:creator>
      <dc:date>2021-10-21T16:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: SUM of Column if selected value is present in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-of-Column-if-selected-value-is-present-in-another-column/m-p/2152287#M49630</link>
      <description>&lt;P&gt;Have you considered teaching your users how to use filters?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 02:37:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-of-Column-if-selected-value-is-present-in-another-column/m-p/2152287#M49630</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-10-25T02:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: SUM of Column if selected value is present in another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-of-Column-if-selected-value-is-present-in-another-column/m-p/2207526#M52001</link>
      <description>&lt;P&gt;The issue is that the filters will filter the amount by product.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following measure will produce the desired output :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total Amount per Client if Product present = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;WithProduct&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;Client[Client]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;[Total Amount]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;'Product'[Product]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;WithProduct&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Nov 2021 10:20:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-of-Column-if-selected-value-is-present-in-another-column/m-p/2207526#M52001</guid>
      <dc:creator>Deckard_X42</dc:creator>
      <dc:date>2021-11-25T10:20:34Z</dc:date>
    </item>
  </channel>
</rss>

