<?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: Calculated Column with if statement in same table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676336#M79987</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;Awesome, that works perfectly fine! If I want to include another Key into this function like "W", how is this possible?&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 18:06:32 GMT</pubDate>
    <dc:creator>joshua1990</dc:creator>
    <dc:date>2022-08-02T18:06:32Z</dc:date>
    <item>
      <title>Calculated Column with if statement in same table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676198#M79983</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;I have a table that has the following structure:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Order Nr&lt;/TD&gt;&lt;TD&gt;Group&lt;/TD&gt;&lt;TD&gt;Key&lt;/TD&gt;&lt;TD&gt;TRUE / FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;TD&gt;R&lt;/TD&gt;&lt;TD&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;TD&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;R&lt;/TD&gt;&lt;TD&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;Group C&lt;/TD&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;TD&gt;TRUE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;Group D&lt;/TD&gt;&lt;TD&gt;R&lt;/TD&gt;&lt;TD&gt;FALSE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THere is a column for the Order Nr, Group and Key.&lt;/P&gt;&lt;P&gt;Now I would like to add the last column with TRUE / FALSE based in this requirements:&lt;/P&gt;&lt;P&gt;TRUE if there is any entry for a Order Nr in the same Group and Key = 'Z'.&lt;/P&gt;&lt;P&gt;As you can see above there is Order Nr 100 in the Group A with 2 entries. One with R and one with Z. Therefor all rows for the order 100 in the same group get TRUE. Otherwise FALSE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is this possible as a calculated column?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 16:45:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676198#M79983</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2022-08-02T16:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column with if statement in same table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676312#M79986</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;It is for creating a new column.&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;
&lt;LI-CODE lang="markup"&gt;True False CC = 
COUNTROWS (
    FILTER (
        Data,
        Data[Order Nr] = EARLIER ( Data[Order Nr] )
            &amp;amp;&amp;amp; Data[Group] = EARLIER ( Data[Group] )
            &amp;amp;&amp;amp; CONTAINS (
                FILTER (
                    Data,
                    Data[Order Nr] = EARLIER ( Data[Order Nr] )
                        &amp;amp;&amp;amp; Data[Group] = EARLIER ( Data[Group] )
                ),
                Data[Key], "Z"
            )
    )
) &amp;gt;= 1
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 Aug 2022 17:51:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676312#M79986</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-08-02T17:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column with if statement in same table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676336#M79987</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;Awesome, that works perfectly fine! If I want to include another Key into this function like "W", how is this possible?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 18:06:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676336#M79987</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2022-08-02T18:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column with if statement in same table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676372#M79988</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Do you mean, Z or W returns true?&lt;/P&gt;
&lt;P&gt;Please check the attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;True False CC =
COUNTROWS (
    FILTER (
        Data,
        Data[Order Nr] = EARLIER ( Data[Order Nr] )
            &amp;amp;&amp;amp; Data[Group] = EARLIER ( Data[Group] )
            &amp;amp;&amp;amp; OR (
                CONTAINS (
                    FILTER (
                        Data,
                        Data[Order Nr] = EARLIER ( Data[Order Nr] )
                            &amp;amp;&amp;amp; Data[Group] = EARLIER ( Data[Group] )
                    ),
                    Data[Key], "Z"
                ),
                CONTAINS (
                    FILTER (
                        Data,
                        Data[Order Nr] = EARLIER ( Data[Order Nr] )
                            &amp;amp;&amp;amp; Data[Group] = EARLIER ( Data[Group] )
                    ),
                    Data[Key], "W"
                )
            )
    )
) &amp;gt;= 1
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 Aug 2022 18:21:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-if-statement-in-same-table/m-p/2676372#M79988</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-08-02T18:21:31Z</dc:date>
    </item>
  </channel>
</rss>

