<?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: This visual has exceeded the available resources in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072745#M14992</link>
    <description>&lt;P&gt;Try this. I can't guarantee it's going to be a lot better (but is certainly better) because I don't know the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[%marque_prev] =
// Please do not use cryptic names that nobody
// understands. Consider others as well,
// not only yourself. Many thanks.
var __another_badly_named_measure = [%marge_CA+CRA]
return
	IF( 
		ISBLANK( __another_badly_named_measure ),
		1,
		
		// if not blank...
		var __measure1 = 
			CALCULATE(
				SUMX(
					DISTINCT('polaris_datamart fait_activite'[cout_theorique]),
					'polaris_datamart fait_activite'[cout_theorique]
				),
				KEEPFILTERS(
					'polaris_datamart dim_intervenant'[type_intervenant] = "collaborateur"
				)
			)
		var measure2 =
			CALCULATE(
				SUM( 'polaris_datamart fait_activite'[nb_jour_realise] ),
				KEEPFILTERS(
					'polaris_datamart dim_nature'[label_nature] = "Projet"
				),
				KEEPFILTERS(
					NOT( 'polaris_datamart dim_gratuite'[gratuite] )
				),
				KEEPFILTERS(
					'polaris_datamart dim_intervenant'[type_intervenant] = "collaborateur"
				)
			)
		var vCoutprev_marge = __measure1 * __measure2
		var __ca_ca_cra = [CA_CA+CRA]
		return
			1 - DIVIDE( vCoutprev_marge, __ca_ca_cra )
	)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, the logic should return exactly the same result as your original measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;BR /&gt;D&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2020 12:18:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-05T12:18:33Z</dc:date>
    <item>
      <title>This visual has exceeded the available resources</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072362#M14966</link>
      <description>&lt;P&gt;this mesure in my table causes a problem , the visual of the table doesn't appear&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to optimize this DAX formula :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%marque_prev = var vCoutprev_marge = CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX(DISTINCT('polaris_datamart fait_activite'[cout_theorique]);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'polaris_datamart fait_activite'[cout_theorique])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;; FILTER('polaris_datamart fait_activite';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RELATED('polaris_datamart dim_intervenant'[type_intervenant]) = "collaborateur")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;) * SUMX( FILTER('polaris_datamart fait_activite';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RELATED('polaris_datamart dim_nature'[label_nature]) = "Projet" &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RELATED('polaris_datamart dim_gratuite'[gratuite]) = FALSE() &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RELATED('polaris_datamart dim_intervenant'[type_intervenant]) = "collaborateur");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'polaris_datamart fait_activite'[nb_jour_realise] ) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var marge = IF( NOT(ISBLANK([CA_CA+CRA])) &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NOT(ISBLANK([%marge_CA+CRA])) &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[CA_CA+CRA]&amp;lt;&amp;gt;0 ; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;INT("1") - DIVIDE(vCoutprev_marge;[CA_CA+CRA]); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;INT("1")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return marge&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 May 2020 09:05:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072362#M14966</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T09:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: This visual has exceeded the available resources</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072655#M14983</link>
      <description>&lt;P&gt;Very difficult to troubleshoot without data, etc. See my 2 part series on troubleshooting DAX performance issues:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-1/ba-p/976275" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-1/ba-p/976275&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-2/ba-p/976813" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-2/ba-p/976813&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:36:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072655#M14983</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-05-05T11:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: This visual has exceeded the available resources</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072697#M14990</link>
      <description>&lt;P&gt;okay , thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 11:51:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072697#M14990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T11:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: This visual has exceeded the available resources</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072745#M14992</link>
      <description>&lt;P&gt;Try this. I can't guarantee it's going to be a lot better (but is certainly better) because I don't know the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[%marque_prev] =
// Please do not use cryptic names that nobody
// understands. Consider others as well,
// not only yourself. Many thanks.
var __another_badly_named_measure = [%marge_CA+CRA]
return
	IF( 
		ISBLANK( __another_badly_named_measure ),
		1,
		
		// if not blank...
		var __measure1 = 
			CALCULATE(
				SUMX(
					DISTINCT('polaris_datamart fait_activite'[cout_theorique]),
					'polaris_datamart fait_activite'[cout_theorique]
				),
				KEEPFILTERS(
					'polaris_datamart dim_intervenant'[type_intervenant] = "collaborateur"
				)
			)
		var measure2 =
			CALCULATE(
				SUM( 'polaris_datamart fait_activite'[nb_jour_realise] ),
				KEEPFILTERS(
					'polaris_datamart dim_nature'[label_nature] = "Projet"
				),
				KEEPFILTERS(
					NOT( 'polaris_datamart dim_gratuite'[gratuite] )
				),
				KEEPFILTERS(
					'polaris_datamart dim_intervenant'[type_intervenant] = "collaborateur"
				)
			)
		var vCoutprev_marge = __measure1 * __measure2
		var __ca_ca_cra = [CA_CA+CRA]
		return
			1 - DIVIDE( vCoutprev_marge, __ca_ca_cra )
	)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, the logic should return exactly the same result as your original measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;BR /&gt;D&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 12:18:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072745#M14992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T12:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: This visual has exceeded the available resources</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072759#M14993</link>
      <description>&lt;P&gt;Another version...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[%marque_prev] =
var __another_badly_named_measure = [%marge_CA+CRA]
return
	switch( true(),
		
		ISBLANK( __another_badly_named_measure ), 1,
		
		var __ca_ca_cra = [CA_CA+CRA]
		return
			if( __ca_ca_cra = 0,
				1,
				
				var __measure1 = 
					CALCULATE(
						SUMX(
							DISTINCT('polaris_datamart fait_activite'[cout_theorique]),
							'polaris_datamart fait_activite'[cout_theorique]
						),
						KEEPFILTERS(
							'polaris_datamart dim_intervenant'[type_intervenant] = "collaborateur"
						)
					)
				var measure2 =
					CALCULATE(
						SUM( 'polaris_datamart fait_activite'[nb_jour_realise] ),
						KEEPFILTERS(
							'polaris_datamart dim_nature'[label_nature]) = "Projet"
						),
						KEEPFILTERS(
							NOT( 'polaris_datamart dim_gratuite'[gratuite] )
						),
						KEEPFILTERS(
							'polaris_datamart dim_intervenant'[type_intervenant] = "collaborateur"
						)
				var vCoutprev_marge = __measure1 * __measure2
				return
					1 - DIVIDE( vCoutprev_marge, __ca_ca_cra )
			)
	)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 12:17:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/This-visual-has-exceeded-the-available-resources/m-p/1072759#M14993</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-05T12:17:02Z</dc:date>
    </item>
  </channel>
</rss>

