<?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: DAX: cyclic dependency detected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761328#M36841</link>
    <description>&lt;P&gt;Does not work&lt;BR /&gt;It is not possible to define a single value for the Company column in the Full table. This can happen if the measure formula refers to a column containing multiple values to get a single result, without specifying an aggregate, such as MIN, MAX...&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 09:04:47 GMT</pubDate>
    <dc:creator>ReyCarter</dc:creator>
    <dc:date>2021-04-02T09:04:47Z</dc:date>
    <item>
      <title>DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761225#M36833</link>
      <description>&lt;P&gt;Greetings!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Friends, tell me how you can overcome the error "Cyclic dependency detected". I make two calculated columns that calculate the same value - but in different units. The first column counts the implementation in rubles, and the second column counts the implementation in weight units.&lt;/P&gt;&lt;P&gt;How can I avoid this error?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;DAX below:&lt;BR /&gt;&lt;BR /&gt;-- first DAX&lt;BR /&gt;Sales in rubles =&lt;BR /&gt;VAR CompanyID = 'Sales '[Company]&lt;BR /&gt;VAR ContractID = 'Sales '[Document]&lt;BR /&gt;VAR ContractDate = 'Sales '[Date_document]&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(SUM('Sales '[Sales_rub]),&lt;BR /&gt;FILTER(ALL('Full'[Company],'Full'[Document], 'Full'[Date_document], 'Full'[Date_approval]),&lt;BR /&gt;'Full'[Company] = CompanyID &amp;amp;&amp;amp; 'Full'[Document] = ContractID &amp;amp;&amp;amp; 'Full'[Date_document] = ContractDate &amp;amp;&amp;amp; 'Full'[Date_document] &amp;gt;= 'Full'[Date_approval]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;DAX: cyclic dependency detected&lt;/P&gt;&lt;P&gt;-- second DAX&lt;BR /&gt;Sales in kilograms =&lt;BR /&gt;VAR CompanyID = 'Sales '[Company]&lt;BR /&gt;VAR ContractID = 'Sales '[Document]&lt;BR /&gt;VAR ContractDate = 'Sales '[Date_document]&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(SUM('Sales '[Sales_kg]),&lt;BR /&gt;FILTER(ALL('Full'[Company],'Full'[Document], 'Full'[Date_document], 'Full'[Date_approval]),&lt;BR /&gt;'Full'[Company] = CompanyID &amp;amp;&amp;amp; 'Full'[Document] = ContractID &amp;amp;&amp;amp; 'Full'[Date_document] = ContractDate &amp;amp;&amp;amp; 'Full'[Date_document] &amp;gt;= 'Full'[Date_approval]&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 08:17:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761225#M36833</guid>
      <dc:creator>ReyCarter</dc:creator>
      <dc:date>2021-04-02T08:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761273#M36835</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280669" data-lia-user-login="ReyCarter" class="lia-mention lia-mention-user"&gt;ReyCarter&lt;/a&gt; , Try new columns like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sales in rubles =&lt;BR /&gt;CALCULATE(SUM('Sales '[Sales_rub]),&lt;BR /&gt;FILTER('Full',&lt;BR /&gt;'Full'[Company] = earlier('Full'[Company]) &amp;amp;&amp;amp; 'Full'[Document] = earlier('Sales '[Document]) &amp;amp;&amp;amp; 'Full'[Date_document] = earlier('Sales '[Date_document]) &lt;BR /&gt;&amp;amp;&amp;amp; 'Full'[Date_document] &amp;gt;= earlier('Full'[Date_approval])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Sales in kilograms =&lt;BR /&gt;CALCULATE(SUM('Sales '[Sales_kg]),&lt;BR /&gt;FILTER('Full',&lt;BR /&gt;'Full'[Company] = earlier('Full'[Company]) &amp;amp;&amp;amp; 'Full'[Document] = earlier('Sales '[Document]) &amp;amp;&amp;amp; 'Full'[Date_document] = earlier('Sales '[Date_document]) &lt;BR /&gt;&amp;amp;&amp;amp; 'Full'[Date_document] &amp;gt;= earlier('Full'[Date_approval])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 08:39:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761273#M36835</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-04-02T08:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761328#M36841</link>
      <description>&lt;P&gt;Does not work&lt;BR /&gt;It is not possible to define a single value for the Company column in the Full table. This can happen if the measure formula refers to a column containing multiple values to get a single result, without specifying an aggregate, such as MIN, MAX...&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 09:04:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761328#M36841</guid>
      <dc:creator>ReyCarter</dc:creator>
      <dc:date>2021-04-02T09:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761341#M36843</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280669" data-lia-user-login="ReyCarter" class="lia-mention lia-mention-user"&gt;ReyCarter&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a very, very, very bad idea to put CALCULATE in a calculated colum of a fact table. You'll feel the heat very soon. Fact tables are usually very big in terms of the number of rows. Forcing the engine to make millions (or many more) context transitions is nothing more than just asking for trouble with performance. And, of course, the use of CALCULATE is also the source of your troubles with cyclic references.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 09:23:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761341#M36843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-02T09:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761345#M36844</link>
      <description>&lt;P&gt;I really like these answers. What's the solution?&lt;BR /&gt;What is good or bad is useful. But it doesn't solve the problem..&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 09:27:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761345#M36844</guid>
      <dc:creator>ReyCarter</dc:creator>
      <dc:date>2021-04-02T09:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761435#M36848</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280669" data-lia-user-login="ReyCarter" class="lia-mention lia-mention-user"&gt;ReyCarter&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me ask you this question: Why don't you use the power of Power Query to calculate these columns? In fact, this &lt;STRONG&gt;&lt;EM&gt;is&lt;/EM&gt;&lt;/STRONG&gt; the very place you should be going to in order to calculate such things, especially on fact tables. The calculation will not only be faster (which is important when refreshing the model). The column will also be compressed in an optimal way which means your DAX will be more performant.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 10:00:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761435#M36848</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-02T10:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761443#M36849</link>
      <description>&lt;P&gt;We have fact tables divided by year into different tables (2020,2021). Only the 2021 table is updated with new data.&lt;BR /&gt;In powerbi, we have a fact table formed by the formula UNION(2020,2021).&lt;BR /&gt;Power Query is not clear how to use it here, since there is no general table in it, there are only two tables for the years 2020,2021 - how to calculate, for example, a column for a fact table that is not physically present in PQ?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 10:11:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761443#M36849</guid>
      <dc:creator>ReyCarter</dc:creator>
      <dc:date>2021-04-02T10:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761485#M36854</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280669" data-lia-user-login="ReyCarter" class="lia-mention lia-mention-user"&gt;ReyCarter&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see you are doing things the wrong way all along. If you have a model where tables are in an Import mode (and I assume you do), then all the tables are imported through Power Query. You should do all our ETL in Power Query, not in DAX. UNION on 2 fact tables in DAX? &lt;EM&gt;Very bad idea&lt;/EM&gt;. Please do all your data preparation in Power Query. This is the right and correct way. Power Query is a data mashup engine for a reason... DAX is for Data Analysis (&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;D&lt;/STRONG&gt;&lt;/FONT&gt;ata &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/FONT&gt;nalysis e&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;X&lt;/STRONG&gt;&lt;/FONT&gt;pressions). Please note that if you don't program your PBI correctly from the start, you'll be having huge problems later down the line. Trust me: You &lt;STRONG&gt;don't&lt;/STRONG&gt; want to do things incorrectly.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 10:45:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761485#M36854</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-02T10:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761511#M36856</link>
      <description>&lt;P&gt;OK, how do you load data from 500 Excel files into Power Query with the same format? You will update the report for 3 hours when a new file appears or a single file in a folder is updated.&lt;BR /&gt;We have a new Excel file in the folder and the division into several tables by year is made so that the old data is not updated, but only the data for 2021 (current) is updated.&lt;BR /&gt;When analyzing data, we work with a common table (including all periods). If you have a better solution, tell me - how can I do this task correctly?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 11:13:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761511#M36856</guid>
      <dc:creator>ReyCarter</dc:creator>
      <dc:date>2021-04-02T11:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761742#M36864</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280669" data-lia-user-login="ReyCarter" class="lia-mention lia-mention-user"&gt;ReyCarter&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've created 500 Excel files in a folder on my PC. In each there is a table with 20 columns (a mix of integers, floats and text) and 365 rows. I used the Folder connector in Power Query to load this data, automatically consolidate into one table and then load into PBI Desktop. The process of fully refreshing all data takes not more than about 10 seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the question is: How many rows do you have in each of the files that you are worried about the refresh time? I'm not sure how to do an incremental refresh when loading data from Excel files and if it's possible at all. I'll have to find out. But if you don't have monstrous Excel files with tens of thousands of rows, then I can't see why you couldn't do what I've done...&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 14:28:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761742#M36864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-02T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761756#M36867</link>
      <description>&lt;P&gt;Following up on my last post... Here's how to make PBI work with incremental refresh when using files:&amp;nbsp;&lt;A href="https://blog.crossjoin.co.uk/2020/04/13/keep-the-existing-data-in-your-power-bi-dataset-and-add-new-data-to-it-using-incremental-refresh/" target="_blank" rel="noopener"&gt;Chris Webb's BI Blog: Keep The Existing Data In Your Power BI Dataset And Add New Data To It Using Incremental Refresh Chris Webb's BI Blog (crossjoin.co.uk)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's the article that Chris refers to at the beginning of his article:&amp;nbsp;&lt;A href="https://www.poweredsolutions.co/2020/01/19/incremental-refresh-for-files-in-a-folder-or-sharepoint-power-bi/" target="_blank"&gt;Incremental refresh for files in a Folder or SharePoint - Power BI — Powered Solutions&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 14:39:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761756#M36867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-02T14:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761820#M36869</link>
      <description>&lt;P&gt;The fact is that we have 500 files and each has 10-15 thousand lines. It takes us 3 hours. I say this not because I'm making it up, but as it is in practice.&lt;BR /&gt;10 thousand is not monstrous files, monstrous is 800 thousand and millions.&lt;BR /&gt;&lt;BR /&gt;Or even on a few tabs like to do.I'll look at your link about incremental updates - but as far as I understand it requires a field with the date of addition - we do not have it.&lt;BR /&gt;More precisely, there is but it does not match the current one.&lt;/P&gt;&lt;P&gt;Therefore, it was decided to do it in the only possible way.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 15:20:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761820#M36869</guid>
      <dc:creator>ReyCarter</dc:creator>
      <dc:date>2021-04-02T15:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761821#M36870</link>
      <description>&lt;P&gt;Incremental updates as far as I understand are available on premium rates and the cloud, we have Desktop.&lt;BR /&gt;We plan to switch to the Report Server&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 15:22:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1761821#M36870</guid>
      <dc:creator>ReyCarter</dc:creator>
      <dc:date>2021-04-02T15:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: cyclic dependency detected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1762045#M36886</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280669" data-lia-user-login="ReyCarter" class="lia-mention lia-mention-user"&gt;ReyCarter&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No. It does NOT require a date field. Please check out the links I posted.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 22:09:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-cyclic-dependency-detected/m-p/1762045#M36886</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-04-02T22:09:34Z</dc:date>
    </item>
  </channel>
</rss>

