<?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: Multiply two measures from two different tables in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Multiply-two-measures-from-two-different-tables/m-p/1463331#M611368</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="201093" data-lia-user-login="MCacc" class="lia-mention lia-mention-user"&gt;MCacc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Believe that the most effective way to solve this would be to unpivot the table 1 columns and then make a dimension table to relate both table that way you could multiply the both measure directly using the dimension table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you have the information in the way yo are presenting you must create the following measure to have the multiplication:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TotalMeasureByDimension = 
SUMX (
    Table_2;
    [MeasureTable2]
        * SWITCH (
            LASTNONBLANK ( Table_2[Dimension]; 0 );
            "A"; [Measure1];
            "B"; [Measure2];
            "C"; [Measure3];
            "D"; [Measure4];
            "E"; [Measure5]
        )
)&lt;/LI-CODE&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>Thu, 29 Oct 2020 12:04:48 GMT</pubDate>
    <dc:creator>MFelix</dc:creator>
    <dc:date>2020-10-29T12:04:48Z</dc:date>
    <item>
      <title>Multiply two measures from two different tables</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Multiply-two-measures-from-two-different-tables/m-p/1457868#M609930</link>
      <description>&lt;P&gt;Hello there, I have a problem implementing a measure logic for my project.&lt;/P&gt;&lt;P&gt;What they're asking me is a multiplication between measures that come from two different (but related) tables:&lt;STRONG&gt; TABLE_1&lt;/STRONG&gt; and &lt;STRONG&gt;TABLE_2&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The two tables are built differently, even though they sort of represent the same thing logically. Let's say that the first table is divided into columns, the second into rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this &lt;STRONG&gt;TABEL_1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NUMBER_A&amp;nbsp; --- NUMBER_B --- NUMBER_C --- NUMBER_D --- NUMBER_E&lt;/P&gt;&lt;P&gt;23&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; 25&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;45&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;67&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;89&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;*NUMBER_A, NUMBER_B, NUMBER_C, ... are just the numbers for my dimension that you'll find in the TABLE_2 as seen below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is &lt;STRONG&gt;TABLE_2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;DIMENSION ---- NUMBER&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 23&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 45&lt;/P&gt;&lt;P&gt;D&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&lt;/P&gt;&lt;P&gt;E&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 89&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Now... I have mad the measures for each column of TABLE_1:&lt;/P&gt;&lt;P&gt;-MEASURE_1 SUM(NUMBER_A)&lt;BR /&gt;-MEASURE_2 SUM(NUMBER_B)&lt;BR /&gt;-MEASURE_3 SUM(NUMBER_C)&lt;BR /&gt;-MEASURE_4 SUM(NUMBER_D)&lt;BR /&gt;MEASURE_5 SUM(NUMBER_E)&lt;BR /&gt;-------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;For the second table TABLE_2 I have only one measure:&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;MEASURE_TABLE2&lt;/STRONG&gt; = SUM(NUMBER)&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;which is then "split" through its dimension "&lt;EM&gt;DIMENSION&lt;/EM&gt;" once is places in a table visual in powerbi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DIMENSIION ----------- MEASURE_TABLE_2&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 677&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;899&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;455&lt;/P&gt;&lt;P&gt;D&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;678&lt;/P&gt;&lt;P&gt;E&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3454&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The issue is, my final measure should be the multiplication between MEASURE 1 and MEASURE TABLE2 grouped by dimension A, then MEASURE 2 grouped by dimension B, ecc...&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;MEASURE 1 * MEASURE TABLE2 (GROUP(A))&lt;/P&gt;&lt;P&gt;MEASURE 2 * MEASURE TABLE2 (GROUP(B))&lt;/P&gt;&lt;P&gt;MEASURE 3 * MEASURE TABLE2 (GROUP(C)), ecc....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to achieve this with only one measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 10:30:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Multiply-two-measures-from-two-different-tables/m-p/1457868#M609930</guid>
      <dc:creator>MCacc</dc:creator>
      <dc:date>2020-10-27T10:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply two measures from two different tables</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Multiply-two-measures-from-two-different-tables/m-p/1463331#M611368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="201093" data-lia-user-login="MCacc" class="lia-mention lia-mention-user"&gt;MCacc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Believe that the most effective way to solve this would be to unpivot the table 1 columns and then make a dimension table to relate both table that way you could multiply the both measure directly using the dimension table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you have the information in the way yo are presenting you must create the following measure to have the multiplication:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TotalMeasureByDimension = 
SUMX (
    Table_2;
    [MeasureTable2]
        * SWITCH (
            LASTNONBLANK ( Table_2[Dimension]; 0 );
            "A"; [Measure1];
            "B"; [Measure2];
            "C"; [Measure3];
            "D"; [Measure4];
            "E"; [Measure5]
        )
)&lt;/LI-CODE&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>Thu, 29 Oct 2020 12:04:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Multiply-two-measures-from-two-different-tables/m-p/1463331#M611368</guid>
      <dc:creator>MFelix</dc:creator>
      <dc:date>2020-10-29T12:04:48Z</dc:date>
    </item>
  </channel>
</rss>

