<?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: How to use IF in an aggregation involving two different tables ? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-IF-in-an-aggregation-involving-two-different-tables/m-p/2764072#M85788</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="432317" data-lia-user-login="Bebs" class="lia-mention lia-mention-user"&gt;Bebs&lt;/a&gt; , if the relation is Many to 1 (secondary)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calculate(Sum(Fact[Result]), filter(fact, Fact[Result]&amp;lt; 0) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for the second done you have a column in fact and use that grouping and just count&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if( Fact[Result] &amp;gt;=0 , "Positive", "Negative")&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 10:23:46 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-09-13T10:23:46Z</dc:date>
    <item>
      <title>How to use IF in an aggregation involving two different tables ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-IF-in-an-aggregation-involving-two-different-tables/m-p/2763886#M85767</link>
      <description>&lt;P&gt;Hello, &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling with DAX syntax on something which seems to be a simple if :).&lt;/P&gt;&lt;P&gt;I've two tables in my model : the fact table seems like this :&lt;/P&gt;&lt;P&gt;Company, Result&lt;/P&gt;&lt;P&gt;A, 3&lt;/P&gt;&lt;P&gt;B, - 5&lt;/P&gt;&lt;P&gt;C, 100&lt;/P&gt;&lt;P&gt;D, -30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is a link on a secondary table&amp;nbsp; :&lt;/P&gt;&lt;P&gt;Company, Group&lt;/P&gt;&lt;P&gt;A, AA&lt;/P&gt;&lt;P&gt;B, AA&lt;/P&gt;&lt;P&gt;C, BB&lt;/P&gt;&lt;P&gt;D, BB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I'd like to display a table "Loss by Group"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AA, -5&lt;/P&gt;&lt;P&gt;BB, -30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) If 1) is Okay, i'd like to display a table like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;total positive, 103&lt;/P&gt;&lt;P&gt;total negative, -35&lt;/P&gt;&lt;P&gt;total , 68&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me on the DAX measure syntax ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&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>Tue, 13 Sep 2022 09:33:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-IF-in-an-aggregation-involving-two-different-tables/m-p/2763886#M85767</guid>
      <dc:creator>Bebs</dc:creator>
      <dc:date>2022-09-13T09:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use IF in an aggregation involving two different tables ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-IF-in-an-aggregation-involving-two-different-tables/m-p/2764072#M85788</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="432317" data-lia-user-login="Bebs" class="lia-mention lia-mention-user"&gt;Bebs&lt;/a&gt; , if the relation is Many to 1 (secondary)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calculate(Sum(Fact[Result]), filter(fact, Fact[Result]&amp;lt; 0) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for the second done you have a column in fact and use that grouping and just count&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if( Fact[Result] &amp;gt;=0 , "Positive", "Negative")&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 10:23:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-IF-in-an-aggregation-involving-two-different-tables/m-p/2764072#M85788</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-13T10:23:46Z</dc:date>
    </item>
  </channel>
</rss>

