<?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 sum of two measure showing incorrect value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021383#M102803</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1 with Stock names and the quantity purchased&lt;/P&gt;&lt;P&gt;Table 2 with Last 1 year Historic prices of each stock&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a two measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Measure 1 - total quantity which is the sum of all the quantites&amp;nbsp; of the stock&lt;/P&gt;&lt;P&gt;2. Measure 2 - Last Traded Price = This gives the Last trade price of each stock on the last traded date say 13th Jan 2023&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the portfolio value on the Last Traded Date which should be simply the the sumproduct of quantity i have (measure 1) and the Last traded price (measure 2) for each stock&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&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>Sun, 15 Jan 2023 11:28:06 GMT</pubDate>
    <dc:creator>baronraghu_3011</dc:creator>
    <dc:date>2023-01-15T11:28:06Z</dc:date>
    <item>
      <title>sum of two measure showing incorrect value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021383#M102803</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1 with Stock names and the quantity purchased&lt;/P&gt;&lt;P&gt;Table 2 with Last 1 year Historic prices of each stock&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a two measure&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Measure 1 - total quantity which is the sum of all the quantites&amp;nbsp; of the stock&lt;/P&gt;&lt;P&gt;2. Measure 2 - Last Traded Price = This gives the Last trade price of each stock on the last traded date say 13th Jan 2023&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the portfolio value on the Last Traded Date which should be simply the the sumproduct of quantity i have (measure 1) and the Last traded price (measure 2) for each stock&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&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>Sun, 15 Jan 2023 11:28:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021383#M102803</guid>
      <dc:creator>baronraghu_3011</dc:creator>
      <dc:date>2023-01-15T11:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: sum of two measure showing incorrect value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021420#M102812</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="462868" data-lia-user-login="baronraghu_3011" class="lia-mention lia-mention-user"&gt;baronraghu_3011&lt;/a&gt;&amp;nbsp;Hard to say with the information provided but, perhaps this is the classic measure totals problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, please vote for this idea: &lt;A href="https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e" target="_blank"&gt;https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This looks like a measure totals problem. Very common. See my post about it here: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also: &lt;A href="https://youtu.be/uXRriTN0cfY" target="_blank"&gt;https://youtu.be/uXRriTN0cfY&lt;/A&gt;&lt;BR /&gt;And: &lt;A href="https://youtu.be/n4TYhF2ARe8" target="_blank"&gt;https://youtu.be/n4TYhF2ARe8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 13:14:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021420#M102812</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-01-15T13:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: sum of two measure showing incorrect value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021426#M102814</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="462868" data-lia-user-login="baronraghu_3011" class="lia-mention lia-mention-user"&gt;baronraghu_3011&lt;/a&gt;&amp;nbsp;can you please share the measures as well as providing a sample of your data would help a lot&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 13:27:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021426#M102814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-15T13:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: sum of two measure showing incorrect value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021515#M102834</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;table 1 has two columns&lt;/P&gt;&lt;P&gt;Column 1 - stock name&lt;/P&gt;&lt;P&gt;Column 2 - quantity&lt;/P&gt;&lt;P&gt;Measure 1 - Sum( Table1[quantity])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 2 has tow columns&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column 1 - Stock Name&lt;/P&gt;&lt;P&gt;Colume 2 - Date&lt;/P&gt;&lt;P&gt;Column 3 -&amp;nbsp; Daily Stock Price&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I craeted a two refernce Measure for the&lt;/P&gt;&lt;P&gt;1. Last Trading Date = Today()-2&lt;/P&gt;&lt;P&gt;2. Stock Price = Sum (Table 2[Stock Price])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure 2 - Last Trading Price = calculate (Stock Price, Filter( Date, Date[Date]= Last Trading Date))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For calculating my total Portfolio Value = Measure 1 ( Total Quantity)* Measure 2 ( Last Trading Price) .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This I understand maynot give correct value as the quantity is multiplied with all the stock prices. So i believe it must be sum product. But hoe to apply has been my concern.&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>Sun, 15 Jan 2023 16:15:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021515#M102834</guid>
      <dc:creator>baronraghu_3011</dc:creator>
      <dc:date>2023-01-15T16:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: sum of two measure showing incorrect value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021523#M102835</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for those links. I understand a bit that using Hasonefilter along with SUMX might&amp;nbsp; turnaround the table the way I want to look but finding it hard to implement.&amp;nbsp;  I have shared&amp;nbsp; snap of my table below for your refernce. The red circle is my issue which doesnt add up.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 16:24:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021523#M102835</guid>
      <dc:creator>baronraghu_3011</dc:creator>
      <dc:date>2023-01-15T16:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: sum of two measure showing incorrect value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021708#M102857</link>
      <description>&lt;P&gt;I think youcan try a sumx measure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sumx(values(table[date]),measure1 * measure 2)&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 22:27:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021708#M102857</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-15T22:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: sum of two measure showing incorrect value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021709#M102858</link>
      <description>&lt;P&gt;Oh i didnt see your latest reply of thr table please try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Correct values = if(hasonevalue(table[stockname]),[portfolio measure],sumx(values(table[stockname]),[portfolio measure]))&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sun, 15 Jan 2023 22:29:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sum-of-two-measure-showing-incorrect-value/m-p/3021709#M102858</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-15T22:29:35Z</dc:date>
    </item>
  </channel>
</rss>

