<?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: Calculate function and direct in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2624197#M76580</link>
    <description>&lt;P&gt;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that a lot of functions won't work with Direct Query. SELECTCOLUMNS isn't working either.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2022 07:38:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-07T07:38:37Z</dc:date>
    <item>
      <title>Calculate function and direct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2622598#M76450</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to recreate a report. Right now I've made it with imported data from SQL but the new report is set to use Direct Query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously I requested a solution for this issue:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Retrieving-and-spreading-data-from-many-side-of-a-one-to-may/m-p/2608522#M75574" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Retrieving-and-spreading-data-from-many-side-of-a-one-to-may/m-p/2608522#M75574&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Earleist Start = 
CALCULATE(
	MIN('Table2'[Timestamp]),
	'Table2'[Timestamp Code] ="Start",
	ALLEXCEPT('Table1', 'Table1'[Prod No])
)

Latest End = 
CALCULATE(
	MAX('Table2'[Timestamp]),
	'Table2'[Timestamp Code] ="End",
	ALLEXCEPT('Table1','Table1'[Prod No])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the formulas don't work when working with Direct Query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how to solve the issues of not being able to use CALCULATE() and ALLEXCEPT() when using Direct Query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 12:58:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2622598#M76450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-06T12:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate function and direct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2622615#M76454</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Plrease try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Earleist Start =
CALCULATE (
    MIN ( 'Table2'[Timestamp] ),
    'Table2'[Timestamp Code] = "Start",
    REMOVEFILTERS ( 'Table1' ),
    VALUES ( 'Table1'[Prod No] )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 06 Jul 2022 13:12:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2622615#M76454</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-06T13:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate function and direct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2622723#M76467</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;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk for your response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I'm not able to use the CALCULATE function when using Direct Query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get this error: "Function 'CALCULATE' is not allowed as part of calculated column DAX expressions on DirectQuery model".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hence the issue as the first solution worked with imported data.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 13:46:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2622723#M76467</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-06T13:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate function and direct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2622766#M76472</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Earleist Start =
MINX (
    FILTER (
        ALL ( 'Table2' ),
        'Table2'[Timestamp Code] = "Start"
            &amp;amp;&amp;amp; 'Table2'[Prod No] = SELECTEDVALUE ( 'Table2'[Prod No] )
    ),
    'Table2'[Timestamp]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 06 Jul 2022 14:05:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2622766#M76472</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-06T14:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate function and direct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2624066#M76570</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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The MINX function is not supported either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I still seem to be stuck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 06:38:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2624066#M76570</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-07T06:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate function and direct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2624110#M76573</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Earleist Start =
SELECTCOLUMNS (
    SUMMARIZE (
        FILTER (
            ALL ( 'Table2' ),
            'Table2'[Timestamp Code] = "Start"
                &amp;amp;&amp;amp; 'Table2'[Prod No] = SELECTEDVALUE ( 'Table2'[Prod No] )
        ),
        'Table2'[Prod No],
        "@TimeStamp", MIN ( 'Table2'[Timestamp] )
    ),
    "@@TimeStamp", [@TimeStamp]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 07 Jul 2022 06:59:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2624110#M76573</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-07T06:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate function and direct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2624197#M76580</link>
      <description>&lt;P&gt;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that a lot of functions won't work with Direct Query. SELECTCOLUMNS isn't working either.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 07:38:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-function-and-direct/m-p/2624197#M76580</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-07T07:38:37Z</dc:date>
    </item>
  </channel>
</rss>

