<?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: SUMX of dimension, exclude fact rows with no related marketvalue in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2359130#M60210</link>
    <description>&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Here's my DAX, it is the crossfilter which seems inefficient. Also filtering twice in seperate SUMX's seems too much.&amp;nbsp;&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;</description>
    <pubDate>Thu, 24 Feb 2022 15:06:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-24T15:06:40Z</dc:date>
    <item>
      <title>SUMX of dimension, exclude fact rows with no related marketvalue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2358731#M60188</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I'm performing a sumx over a dimension table.&lt;BR /&gt;&lt;BR /&gt;For each iteration in the SUMX I need to validate if the SUM of the marketvalue_exporuse in for that Secitity_ID, the Fact_MeasuresESG is not blank or zero.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It seems simple, but my only sulution for now is to enable a crossfilter between Dim_Security and FactMeasureseESG, in that way the marketvalue can filter the empty&amp;nbsp;CarbonEmissions_TperUSD.&lt;BR /&gt;&lt;BR /&gt;This doesnt feel performant or logical, can anyone guide me in the right direction?&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;</description>
      <pubDate>Thu, 24 Feb 2022 12:51:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2358731#M60188</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-24T12:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX of dimension, exclude fact rows with no related marketvalue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2359099#M60206</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , In this case, seme like a better solution to have bi-directional join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or have a new column, which populate if there is null/0&amp;nbsp; marketvalue_exporuse flag&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 14:56:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2359099#M60206</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-02-24T14:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX of dimension, exclude fact rows with no related marketvalue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2359111#M60207</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;, can you show us the DAX for how you're solving it using a crossfilter as it might help us to better understand what you're trying to achieve?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 14:59:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2359111#M60207</guid>
      <dc:creator>Russell-PBI</dc:creator>
      <dc:date>2022-02-24T14:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX of dimension, exclude fact rows with no related marketvalue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2359130#M60210</link>
      <description>&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Here's my DAX, it is the crossfilter which seems inefficient. Also filtering twice in seperate SUMX's seems too much.&amp;nbsp;&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;</description>
      <pubDate>Thu, 24 Feb 2022 15:06:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2359130#M60210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-24T15:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX of dimension, exclude fact rows with no related marketvalue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2369189#M60733</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can replace the inner part with Var, such as the following form:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
var _CATEGORY_VALUES=
VALUES('Transformatie Dim_Security'[Dim_Security_ID])
VAR _SumCarbonEmissions_TperUSD=
CALCULATE(SUM('Transfomate Fact_MeasureESG'[CarbonEmissions_TperUSD]))
VAR _SumMarketValue_ReportingCurrency=
CALCULATE(
    SUM('Transformate Fact_MarketValue_Exposure'[MarketValue_ReportingCurrency]),
    'Transfomate Fact_MeasureESG'[CarbonEmissions_TperUSD]&amp;lt;&amp;gt;BLANK() || 'Transfomate Fact_MeasureESG'[CarbonEmissions_TperUSD] &amp;gt;0)
return
CALCULATE(
    DIVIDE(
        SUMX(
            _CATEGORY_VALUES,
            _SumCarbonEmissions_TperUSD * _SumMarketValue_ReportingCurrency),
         SUMX(
             _CATEGORY_VALUES,
             _SumMarketValue_ReportingCurrency)),
             CROSSFILTER('Transformatie Dim_Security'[Dim_Security_ID],'Transfomate Fact_MeasureESG'[Dim_Security_ID],Both))  &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 06:27:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-of-dimension-exclude-fact-rows-with-no-related-marketvalue/m-p/2369189#M60733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-02T06:27:14Z</dc:date>
    </item>
  </channel>
</rss>

