<?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: Getting the sum of a column when the value is the same as previous row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840057#M90731</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391911" data-lia-user-login="Smalfly" class="lia-mention lia-mention-user"&gt;Smalfly&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately the solution in this artikel is for one table. I am using as mentioned 3 different tables.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 15:18:01 GMT</pubDate>
    <dc:creator>CR72022</dc:creator>
    <dc:date>2022-10-13T15:18:01Z</dc:date>
    <item>
      <title>Getting the sum of a column when the value is the same as previous row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2839595#M90692</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below you see 3 tables. In the first table there 3 columns from 3 different tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;isin column from table dim instrument, hedge from dim trade and PV_hedge is a measure from Fact trade. The total value of PV_hedge is correct namelijk 100 mil.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to achieve is the last table I want to see one row ISIN and the total of PV_hedge. In this case ISIN 2485 and PV_hedge 100 mil.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the measure that I am using. I tried to use earlier but it doens not allowd.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PV_Hedge = 
 CALCULATE(SUM('Fact Trade'[amt_present_value]), 'Dim Trade_oud'[hedge_ref_trade_number] = 'Dim Trade_oud'[hedge_ref_trade_number])&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;&lt;P&gt;Thank for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 11:58:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2839595#M90692</guid>
      <dc:creator>CR72022</dc:creator>
      <dc:date>2022-10-13T11:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sum of a column when the value is the same as previous row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2839963#M90727</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="456037" data-lia-user-login="CR72022" class="lia-mention lia-mention-user"&gt;CR72022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the group by function might help you out.&lt;/P&gt;&lt;P&gt;Have a look at this page for more information about it:&lt;/P&gt;&lt;P&gt;&lt;A href="https://hevodata.com/learn/power-bi-groupby-function/#5" target="_blank"&gt;https://hevodata.com/learn/power-bi-groupby-function/#5&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 14:45:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2839963#M90727</guid>
      <dc:creator>Smalfly</dc:creator>
      <dc:date>2022-10-13T14:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sum of a column when the value is the same as previous row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840057#M90731</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391911" data-lia-user-login="Smalfly" class="lia-mention lia-mention-user"&gt;Smalfly&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately the solution in this artikel is for one table. I am using as mentioned 3 different tables.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:18:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840057#M90731</guid>
      <dc:creator>CR72022</dc:creator>
      <dc:date>2022-10-13T15:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sum of a column when the value is the same as previous row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840092#M90735</link>
      <description>&lt;P&gt;You indeed mentioned that. Sorry for not taking it into account.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you are using multiple tables, you should first use the addcolumn function to combine the information you need. And once that is done, you can use summarize to calculate the sum.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:28:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840092#M90735</guid>
      <dc:creator>Smalfly</dc:creator>
      <dc:date>2022-10-13T15:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sum of a column when the value is the same as previous row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840108#M90736</link>
      <description>&lt;P&gt;No probleem, what do you mean bij combine information? Which information exactly?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:33:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840108#M90736</guid>
      <dc:creator>CR72022</dc:creator>
      <dc:date>2022-10-13T15:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sum of a column when the value is the same as previous row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840395#M90754</link>
      <description>&lt;P&gt;Somehting like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Table = &lt;BR /&gt;var combinetable = ADDCOLUMNS('dim instrument',&lt;BR /&gt;"New Hedge",RELATED('dim instrument'[hedge]),&lt;BR /&gt;"New PV_hedge",RELATED('Fact Trade'[PV_Hedge]))&lt;BR /&gt;return &lt;BR /&gt;SUMMARIZE(combinetable,[ISIN],[New Hedge],Final Hedge,sum(New PV_hedge))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just me typing it in here directly to express the idea I had on how to do this. I did not check this code in Power BI so it will definitiely need rework but I hope you get the idea.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a matter of fact, if the relation between the 3 tables is explicit, you might not even need the ADDCOLUMNS.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 18:30:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sum-of-a-column-when-the-value-is-the-same-as/m-p/2840395#M90754</guid>
      <dc:creator>Smalfly</dc:creator>
      <dc:date>2022-10-13T18:30:45Z</dc:date>
    </item>
  </channel>
</rss>

