<?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 Calculate with values from different tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/963716#M11389</link>
    <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;(big thanks already for the endless answers i got by browsing this forum!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here&amp;nbsp;is my problem - i want to create a measure that would output the total rebate in the example below:&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the DAX i tried:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TOTAL REBATE = sumX(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table TURNOVER';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table TURNOVER'[Eur Order];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table REBATE'[rebate]); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"result";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table TURNOVER'[Eur Order]*'Table REBATE'[rebate]);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[result])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unfortunately it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Many thanks!&lt;/STRONG&gt; (sorry if this is really basic...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Mar 2020 12:47:31 GMT</pubDate>
    <dc:creator>newbie74</dc:creator>
    <dc:date>2020-03-09T12:47:31Z</dc:date>
    <item>
      <title>Calculate with values from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/963716#M11389</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;(big thanks already for the endless answers i got by browsing this forum!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here&amp;nbsp;is my problem - i want to create a measure that would output the total rebate in the example below:&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the DAX i tried:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TOTAL REBATE = sumX(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table TURNOVER';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table TURNOVER'[Eur Order];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table REBATE'[rebate]); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"result";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Table TURNOVER'[Eur Order]*'Table REBATE'[rebate]);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[result])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unfortunately it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Many thanks!&lt;/STRONG&gt; (sorry if this is really basic...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 12:47:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/963716#M11389</guid>
      <dc:creator>newbie74</dc:creator>
      <dc:date>2020-03-09T12:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with values from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/963723#M11390</link>
      <description>&lt;P&gt;Perhaps try something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
  VAR __Table =
    ADDCOLUMNS(
      ADDCOLUMNS(
        SUMMARIZE(
          'TURNOVER',
          [customer],
          "__EUROrder",SUM('TURNOVER'[EUR Order])
        )
        "__Rebate",LOOKUPVALUE('REBATE'[rebate],'REBIATE'[customer],[customer])
      ),
      "__Total",[__EUROrder] * [__Rebate]
    )
RETURN
  SUMX(__Table,[__Total])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 00:15:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/963723#M11390</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-09T00:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with values from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/964546#M11408</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="213690" data-lia-user-login="newbie74" class="lia-mention lia-mention-user"&gt;newbie74&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assueme both table are connected on Customer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Drag customer, EUR order from first table and rebate from second table into table visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New Measure=Sumx(table1,table1[Eur ORder]*related(table2[Rebate]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Pravin Wattamwar&lt;BR /&gt;&lt;A href="http://www.linkedin.com/in/pravin-p-wattamwar" target="_blank"&gt;www.linkedin.com/in/pravin-p-wattamwar&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If I resolve your problem Mark it as a solution and give kudos.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 12:04:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/964546#M11408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-09T12:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with values from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/964658#M11414</link>
      <description>&lt;P&gt;Many thanks for your help - i realized that by wanting to simplify my case, i misled the helpers like you &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please have a look at the new diagram i just published to explain the exact case.&lt;/P&gt;&lt;P&gt;I could not execute the lookupvalue as you suggested due to this "3 tables " chain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 12:49:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/964658#M11414</guid>
      <dc:creator>newbie74</dc:creator>
      <dc:date>2020-03-09T12:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with values from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/964676#M11417</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="213690" data-lia-user-login="newbie74" class="lia-mention lia-mention-user"&gt;newbie74&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why don't you merge table orders and table turnover on column orders and then create the measure which i have suggested in previous comment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;incase if you don't want to merge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;measure=Sumx('orders',related(Turnover[orders])*relatedtable(Customer[Rebate]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Pravin Wattamwar&lt;BR /&gt;&lt;A href="http://www.linkedin.com/in/pravin-p-wattamwar" target="_blank"&gt;www.linkedin.com/in/pravin-p-wattamwar&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If I resolve your problem Mark it as a solution and give kudos.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 12:55:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/964676#M11417</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-09T12:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with values from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/964774#M11419</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; thanks but not there yet .&lt;/P&gt;&lt;P&gt;1) i cannot merge both tables as data goes way beyond my example.&lt;/P&gt;&lt;P&gt;2) there seem to be an error with your formula as in the RELATED formula, the turnover table is not a choice, only the tables that "feeds" into the order table are a possibility (so the rebate table values are accepted).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers and again thanks for the support!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 13:36:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/964774#M11419</guid>
      <dc:creator>newbie74</dc:creator>
      <dc:date>2020-03-09T13:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate with values from different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/966654#M11466</link>
      <description>&lt;P&gt;play with related and relatedtable function&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Related works for many to 1&lt;/P&gt;&lt;P&gt;relatedtable works for 1 to many.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Pravin Wattamwar&lt;BR /&gt;&lt;A href="http://www.linkedin.com/in/pravin-p-wattamwar" target="_blank"&gt;www.linkedin.com/in/pravin-p-wattamwar&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If I resolve your problem Mark it as a solution and give kudos.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 11:38:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-with-values-from-different-tables/m-p/966654#M11466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-10T11:38:46Z</dc:date>
    </item>
  </channel>
</rss>

