<?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: FIlter data on retrieve in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/2674344#M37657</link>
    <description>&lt;P&gt;I did find out a partial solution using TDS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example if I just want salesorders which were created after 2021-01-01, I found that using the current version of PBI Desktop, the sequence is......&lt;/P&gt;&lt;P&gt;1. CLick Dataverse&lt;/P&gt;&lt;P&gt;2. Select environment&lt;/P&gt;&lt;P&gt;3. Select Salesorder - Then hit transform data&lt;/P&gt;&lt;P&gt;4. Then select Advanced editor&lt;/P&gt;&lt;P&gt;Replace EVERYTHING that is presented with something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let Source = CommonDataService.Database("yourenvironment.crm6.dynamics.com"),&lt;BR /&gt;DataverseSQL=Value.NativeQuery(Source,"Select * from salesorder where createdon &amp;gt; '2021-01-01'",null,[EnableFolding=true])&lt;BR /&gt;in&lt;BR /&gt;DataverseSQL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STan&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 03:34:46 GMT</pubDate>
    <dc:creator>stan_w_gifford</dc:creator>
    <dc:date>2022-08-02T03:34:46Z</dc:date>
    <item>
      <title>FIlter data on retrieve</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/2377265#M34789</link>
      <description>&lt;P&gt;Good morning from an extremely wet Sydney Australia.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a report where I would like to retrieve data from Dynamics (Dataverse) based on a smaller table from dataverse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that has a number of GUID entries which point to Sales orders in CRM. The Guids in the smaller table will have duplicates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would only like to retrieve from Dataverse those orders that match the GUID's in the smaller table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to refresh the data much quicker - I would only need to retrieve about 1% of the order data - the order table is huge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to construct the retrieve that anyone can advise on?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Sun, 06 Mar 2022 20:03:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/2377265#M34789</guid>
      <dc:creator>stan_w_gifford</dc:creator>
      <dc:date>2022-03-06T20:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: FIlter data on retrieve</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/2382909#M34832</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/335059"&gt;@stan_w_gifford&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think&amp;nbsp;Dataverse supports SQL query. You can add filter by SQL query like select ... from... in Advanced in Power Query Editor.&lt;/P&gt;
&lt;P&gt;Here are some similar threads for your reference:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Pre-Filtering-Data-before-Importing/td-p/407376" target="_self"&gt;Pre-Filtering Data before Importing&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Filetring-my-table-before-importing-in-PowerBi/td-p/275871" target="_self"&gt;Filetring my table before importing in PowerBi&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 07:36:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/2382909#M34832</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-09T07:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: FIlter data on retrieve</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/2674344#M37657</link>
      <description>&lt;P&gt;I did find out a partial solution using TDS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example if I just want salesorders which were created after 2021-01-01, I found that using the current version of PBI Desktop, the sequence is......&lt;/P&gt;&lt;P&gt;1. CLick Dataverse&lt;/P&gt;&lt;P&gt;2. Select environment&lt;/P&gt;&lt;P&gt;3. Select Salesorder - Then hit transform data&lt;/P&gt;&lt;P&gt;4. Then select Advanced editor&lt;/P&gt;&lt;P&gt;Replace EVERYTHING that is presented with something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let Source = CommonDataService.Database("yourenvironment.crm6.dynamics.com"),&lt;BR /&gt;DataverseSQL=Value.NativeQuery(Source,"Select * from salesorder where createdon &amp;gt; '2021-01-01'",null,[EnableFolding=true])&lt;BR /&gt;in&lt;BR /&gt;DataverseSQL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STan&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 03:34:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/2674344#M37657</guid>
      <dc:creator>stan_w_gifford</dc:creator>
      <dc:date>2022-08-02T03:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: FIlter data on retrieve</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/3039959#M40879</link>
      <description>&lt;P&gt;Hi Stan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you mange to make this work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I'm working with dataverse my pipeline is usually Datavers -&amp;gt; PowerBI Dataflow -&amp;gt; PowerBI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because i noticed that the basice "cleaning" like column selection, and let's say a status filtering, are faster in the dataflow (furthermore, like this we are not querying the dataverse with 100 reports &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also facing your same issue, that it would be good to have some more effective folding method, and not so headscratching as using the XMLfetch tool to pre-filter the dataverse query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately what you wrote here above, is not working for me (tested on the standard account entity/table)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 11:06:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/3039959#M40879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-24T11:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: FIlter data on retrieve</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/3041690#M40890</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I didn't go much further on this - I found that using TDS was sufficient for my purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PowerBI Data Flow is a new one on me - sounds like some research may be warranted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 03:24:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/FIlter-data-on-retrieve/m-p/3041690#M40890</guid>
      <dc:creator>stan_w_gifford</dc:creator>
      <dc:date>2023-01-25T03:24:28Z</dc:date>
    </item>
  </channel>
</rss>

