<?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 DAX for all related records meet criteria in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443416#M130865</link>
    <description>&lt;P&gt;I have ORDERS, which have LINES, which can have one or more ERRORS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Those ERRORS can be ADDRESSABLE, or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write a measure that returns LINES WITH ONLY ADDRESSABLE ERRORS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can write for ADDRESSABLE_LINE_ERRORS and NON-ADDRESSABLE_LINE_ERRORS--but these are totals…I need to know where all LINES in the ORDER are all ADDRESSABLE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also trying to do this in a dual-storage/DirectQuery model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a PBIX:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1tU89i4yzGdNehhxm4j-ySvmCsMIJ9AVC/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1tU89i4yzGdNehhxm4j-ySvmCsMIJ9AVC/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2023 15:36:14 GMT</pubDate>
    <dc:creator>jeffshieldsdev</dc:creator>
    <dc:date>2023-09-22T15:36:14Z</dc:date>
    <item>
      <title>DAX for all related records meet criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443416#M130865</link>
      <description>&lt;P&gt;I have ORDERS, which have LINES, which can have one or more ERRORS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Those ERRORS can be ADDRESSABLE, or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write a measure that returns LINES WITH ONLY ADDRESSABLE ERRORS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can write for ADDRESSABLE_LINE_ERRORS and NON-ADDRESSABLE_LINE_ERRORS--but these are totals…I need to know where all LINES in the ORDER are all ADDRESSABLE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also trying to do this in a dual-storage/DirectQuery model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a PBIX:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1tU89i4yzGdNehhxm4j-ySvmCsMIJ9AVC/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1tU89i4yzGdNehhxm4j-ySvmCsMIJ9AVC/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 15:36:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443416#M130865</guid>
      <dc:creator>jeffshieldsdev</dc:creator>
      <dc:date>2023-09-22T15:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for all related records meet criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443580#M130879</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 17:16:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443580#M130879</guid>
      <dc:creator>ThxAlot</dc:creator>
      <dc:date>2023-09-22T17:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for all related records meet criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443639#M130882</link>
      <description>&lt;P&gt;Very cool, thanks!&lt;/P&gt;&lt;P&gt;I was able to adapt to this measure to give me Lines with only addressable errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;__ADDRESSABLE_LINES = CALCULATE(
    [__LINES],
    ERRORS[IS_ADDRESSABLE],
    LINE_ERRORS
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: I was seeing false positives with the above, so created these instead:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;__LINE_HAS_ONLY_ADDRESSABLE_ERRORS = CALCULATE(
    ISEMPTY( ERRORS ),
    NOT ERRORS[IS_ADDRESSABLE],
    LINE_ERRORS
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;__NON-ADDRESSABLE_LINES = CALCULATE(
    [__LINES],
    NOT ERRORS[IS_ADDRESSABLE],
    LINE_ERRORS
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then the measure I ultimately need:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;__ADDRESSABLE_LINES = [__LINES] - [__NON-ADDRESSABLE_LINES]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 19:15:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443639#M130882</guid>
      <dc:creator>jeffshieldsdev</dc:creator>
      <dc:date>2023-09-22T19:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for all related records meet criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443810#M130894</link>
      <description>&lt;P&gt;Well, it's working great with my Import tables, but with my dual-storage/DirectQuery tables, I'm getting this error:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I may have to move this calcuation upstream to the DB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 21:31:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3443810#M130894</guid>
      <dc:creator>jeffshieldsdev</dc:creator>
      <dc:date>2023-09-22T21:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: DAX for all related records meet criteria</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3446463#M131143</link>
      <description>&lt;P&gt;Two things helped this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using COUNT() instead of COUNTROWS()&lt;UL&gt;&lt;LI&gt;COUNT() uses a column instead of a table, so I just used 'LINE_ERRORS'[ERROR_ID]&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;No value was returned when using NOT ERRORS[IS_ADDRESSABLE] in DirectQuery, so I switched to ERRORS[IS_ADDRESSABLE] = FALSE() and that worked.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 25 Sep 2023 17:44:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-for-all-related-records-meet-criteria/m-p/3446463#M131143</guid>
      <dc:creator>jeffshieldsdev</dc:creator>
      <dc:date>2023-09-25T17:44:49Z</dc:date>
    </item>
  </channel>
</rss>

