<?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: Refresh failed because this semantic model requires a gateway. How to avoid without gateway? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4674975#M60911</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp; for the prompt response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Apr 2025 15:03:22 GMT</pubDate>
    <dc:creator>v-sathmakuri</dc:creator>
    <dc:date>2025-04-30T15:03:22Z</dc:date>
    <item>
      <title>Refresh failed because this semantic model requires a gateway. How to avoid without gateway?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4668015#M60786</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have 3 queries in power query created:&lt;BR /&gt;&lt;BR /&gt;1. Result&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Result = if ParamEnvironment = "Customer" then 
        Table.FromRows({}, {"RegionID", "RegionName", "RegionCode", "DataCenterLocation"}) 
    else 
        CSVSource()
in
    Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. paramEnvironment&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"Customer" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. CSVSource&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
CSVSource = () =&amp;gt; Folder.Files("D:\cost-mgmt-data1\CostManagement\")
in
CSVSource&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;All:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_1-1745568084087.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1263280i6DC4255DDC2A81D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_1-1745568084087.png" alt="jaryszek_1-1745568084087.png" /&gt;&lt;/span&gt;&lt;BR /&gt;I disabled "Enable Load" option for CSVSource to be sure that it will not be loaded and refreshed in power bi service.&amp;nbsp;&lt;BR /&gt;But still when referencing in Result query within if statement -&amp;gt; it is requiring me to refresh this source and use gateway.&lt;BR /&gt;As seperate query without any dependencies to other queries - it is working without any issue.&amp;nbsp;&lt;BR /&gt;But seperate query without refering it from other queries make no sense.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;----------------------------&lt;/P&gt;&lt;P&gt;I am getting error after publishing:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_0-1745567886872.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1263277iDEE43AD997F03DAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_0-1745567886872.png" alt="jaryszek_0-1745567886872.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;the thing is that local files should work only on desktop, i do not want to propagate to service and run gateway.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Goal:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Have my team working in power bi desktop environment using local files and after publishing report into customer tenant - switch datasources for customer's database without asking about gateway for CSV files...&lt;BR /&gt;&lt;/STRONG&gt;In other words:&lt;BR /&gt;Using &lt;STRONG&gt;local dev files&lt;/STRONG&gt; in Power BI Desktop, but &lt;STRONG&gt;not shipping them to Power BI Service&lt;/STRONG&gt;&amp;nbsp;-&amp;nbsp;&lt;EM&gt;no gateway needed&lt;/EM&gt; in production&lt;BR /&gt;&lt;BR /&gt;How to make this working? Lambda function does not work...&lt;BR /&gt;Set up took from here:&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/2-datasets-or-parameters-to-upload-report-within-customer-tenant/m-p/4666606#M60745" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Developer/2-datasets-or-parameters-to-upload-report-within-customer-tenant/m-p/4666606#M60745&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 08:59:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4668015#M60786</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-04-25T08:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh failed because this semantic model requires a gateway. How to avoid without gateway?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4668362#M60793</link>
      <description>&lt;LI-CODE lang="markup"&gt;Goal:
Have my team working in power bi desktop environment using local files&lt;/LI-CODE&gt;
&lt;P&gt;I think that is a futile exercise. At a minimum place these "local" files on a SharePoint. That obviates the need for a gateway.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 12:01:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4668362#M60793</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-25T12:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh failed because this semantic model requires a gateway. How to avoid without gateway?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4668416#M60795</link>
      <description>&lt;P&gt;So all this code from Microsoft :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
Environment = Parameter_Environment,

Source = if Environment = "Team" then
Csv.Document(File.Contents("ExcelPath"))
else if Environment = "Customer" then
Sql.Database("CustomerDBServer", "CustomerDB")
else
error "Unsupported environment"
in
Source&lt;/LI-CODE&gt;&lt;P&gt;will not work anyway without gateway?&lt;BR /&gt;&lt;BR /&gt;I heard also:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If you want to keep your approach, you have to disable the dev queries right before you publish the model to the web service.&lt;/LI-CODE&gt;&lt;P&gt;it will not work if i have used If statement refering to any even disabled query because it will require to have gateway still... even on Customer Environment.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;You can handle this scenario best by using a parameter in Power Query that controls which data source to use. Define a parameter like SourceMode with values such as "Dev" and "Customer". In your Power Query logic, use an if-statement that switches data sources based on the parameter's value. For example, if the parameter is set to "Dev", pull from your CSV or GitHub. If it's set to "Customer", connect to the customer’s SQL database.
Before publishing the report to the customer's tenant, switch the parameter to "Customer" and make sure the queries using dev sources are either removed or disabled to prevent errors. Then publish with only the customer database source active. This way, the dataset remains refreshable on the customer side, assuming the CustomerDatabase is accessible through either a gateway or a direct connection.
This approach avoids the complexity of managing two separate datasets and keeps everything in a single PBIX file with conditional logic handling the data source.&lt;/LI-CODE&gt;&lt;P&gt;this is another solution from another power bi developer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It seems that everybody advise to have swither and disabled queries but it seems to not be woring if even one query depends on this disabled one....&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 12:42:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4668416#M60795</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-04-25T12:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh failed because this semantic model requires a gateway. How to avoid without gateway?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4669207#M60803</link>
      <description>&lt;P&gt;You are "fighting the API".&amp;nbsp; You are trying to do something that the Formula Firewall is actively trying to prevent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-query/data-privacy-firewall" target="_blank"&gt;https://learn.microsoft.com/en-us/power-query/data-privacy-firewall&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2025 14:10:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4669207#M60803</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-26T14:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh failed because this semantic model requires a gateway. How to avoid without gateway?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4674975#M60911</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp; for the prompt response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 15:03:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4674975#M60911</guid>
      <dc:creator>v-sathmakuri</dc:creator>
      <dc:date>2025-04-30T15:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh failed because this semantic model requires a gateway. How to avoid without gateway?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4680766#M61006</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 17:07:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4680766#M61006</guid>
      <dc:creator>v-sathmakuri</dc:creator>
      <dc:date>2025-05-05T17:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh failed because this semantic model requires a gateway. How to avoid without gateway?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4684954#M61078</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/107617"&gt;@jaryszek&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I&amp;nbsp;hope this information provided is helpful. Feel free to reach out if you have any further questions or would like to discuss this in more detail. If responses provided answers your question, please&amp;nbsp;accept it as a solution&amp;nbsp;so other community members with similar problems can find a solution faster.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 12:39:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Refresh-failed-because-this-semantic-model-requires-a-gateway/m-p/4684954#M61078</guid>
      <dc:creator>v-sathmakuri</dc:creator>
      <dc:date>2025-05-08T12:39:46Z</dc:date>
    </item>
  </channel>
</rss>

