<?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: Sales orders that contain apples Y/N in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3157225#M113267</link>
    <description>&lt;P&gt;Hi, thanks for your reply, unfortunately I get an error when I try that - 'EARLIER/EARLIEST refers to an earlier row context which doesn't exist'.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 23:51:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-03-27T23:51:43Z</dc:date>
    <item>
      <title>Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3155335#M113158</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What is the column or measure formula to generate the Y or N in the 'Does the order contain apples' column? Using a DirectQuery model.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;OrderID&lt;/TD&gt;&lt;TD&gt;Item&lt;/TD&gt;&lt;TD&gt;Does the order contain apples?&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;001&lt;/TD&gt;&lt;TD&gt;Apples&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;001&lt;/TD&gt;&lt;TD&gt;Brocolli&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;002&lt;/TD&gt;&lt;TD&gt;Pears&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;002&lt;/TD&gt;&lt;TD&gt;Apples&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;002&lt;/TD&gt;&lt;TD&gt;Bananas&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;003&lt;/TD&gt;&lt;TD&gt;Bananas&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;003&lt;/TD&gt;&lt;TD&gt;Pears&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;004&lt;/TD&gt;&lt;TD&gt;Apples&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 00:23:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3155335#M113158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-03T00:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3155451#M113167</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;contain apples =
IF (
    "Apple"
        IN CALCULATETABLE (
            VALUES ( 'Table'[Item] ),
            ALLEXCEPT ( 'Table', 'Table'[OrderID] )
        ),
    "Y",
    "N"
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Mar 2023 08:12:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3155451#M113167</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-27T08:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3155484#M113172</link>
      <description>&lt;P&gt;NewColumn=IF(COUNTROWS(FILTER(Table,Table[Item]="Apples"&amp;amp;&amp;amp;Table[OrderID]=EARLIER(Table[OrderID])))&amp;gt;0,"Y","N")&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 08:24:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3155484#M113172</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2023-03-27T08:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3157225#M113267</link>
      <description>&lt;P&gt;Hi, thanks for your reply, unfortunately I get an error when I try that - 'EARLIER/EARLIEST refers to an earlier row context which doesn't exist'.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 23:51:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3157225#M113267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-27T23:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3157226#M113268</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;, thanks for your reply. I've inputted that formula and it doesn't error, but then when I try and add it to my table it says 'Can't display the visual' - I'm using a Direct Query model if that makes a difference?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 23:57:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3157226#M113268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-27T23:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3157642#M113302</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;If you are creating a measure, then please clarify the existing filter context.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 05:59:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3157642#M113302</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-28T05:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3159673#M113427</link>
      <description>&lt;P&gt;my code is to create a calculated column, not a measure&lt;/P&gt;
&lt;P&gt;if to create a measure, try this&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=IF(CALCULATE(COUNTROWS(Table),Table[Item]="Apples",ALLEXCEPT(Table,Table[OrderID]))&amp;gt;0,"Y","N")&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 02:03:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3159673#M113427</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2023-03-29T02:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3168128#M114104</link>
      <description>&lt;P&gt;Hi, when I tried the original formula as a column, it said 'Function 'COUNTROWS' is not allowed as part of calculated column DAX expressions on DirectQuery models', and the latter formula as a measure it doesn't error when creating it but says 'can't display the visual' when I add it to a table. Sorry I should of mentioned in my original post I'm using Direct Query, I'll add that in now. So I'm not sure if there is a solve for this using DAX, maybe only SQL?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 00:23:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3168128#M114104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-03T00:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sales orders that contain apples Y/N</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3168132#M114106</link>
      <description>&lt;P&gt;Hi, If I use your formula for a column it says 'Function 'CONTAINSROW' is not allowed as part of calculated column DAX expressions on DirectQuery models' which is odd since 'CONTAINSROW' is not actually in the formula.&lt;/P&gt;&lt;P&gt;Re: filter context, I'm not sure if I understand the question sorry - I have a date filter applied, but I want this formula to ignore all filters.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 00:26:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-orders-that-contain-apples-Y-N/m-p/3168132#M114106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-03T00:26:13Z</dc:date>
    </item>
  </channel>
</rss>

