<?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 All only responds to grouping / implicit filtering in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1048559#M14274</link>
    <description>Please try to remember this one golden rule of DAX programming: ALWAYS, ALWAYS, ALWAYS use a star schema, no matter how small your model is. If you want to see what can happen if you don't use it, please have a look at this:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/understanding-dax-auto-exist/" target="_blank"&gt;https://www.sqlbi.com/articles/understanding-dax-auto-exist/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please read this well, let it sink in, and never again be tempted to by-pass the necessary step of creating a good star-schema model.&lt;BR /&gt;&lt;BR /&gt;You'll thank me later.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
    <pubDate>Sat, 25 Apr 2020 18:28:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-04-25T18:28:37Z</dc:date>
    <item>
      <title>Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1044209#M14047</link>
      <description>&lt;P&gt;I'm using the following measure to calculate the expected number of incidents per department:&amp;nbsp;&lt;/P&gt;&lt;P&gt;ExpIncidentCount = sum(Mydata[Persons])*calculate([frequency], all (Mydata[Department]))&lt;/P&gt;&lt;P&gt;(i.e. using the company-wide frequency to calculate the number of incidents in the department)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works OK in a visual grouped by department (i.e. grouping rather than explicitly filtering by department) - but when filtering for a department the all-statement seems to be ignored.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this a PowerBI error or is the all-statement only supposed to respond to implicit filtering?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 12:03:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1044209#M14047</guid>
      <dc:creator>christianirgens</dc:creator>
      <dc:date>2020-04-23T12:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1044359#M14053</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="56621" data-lia-user-login="christianirgens" class="lia-mention lia-mention-user"&gt;christianirgens&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you mean, when you filter by any department you get the same value ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If yes, try it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ExpIncidentCount = sum(Mydata[Persons])*calculate([frequency], ALLSELECTED(Mydata[Department]))&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If not, show us some example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 13:07:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1044359#M14053</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-04-23T13:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1044577#M14064</link>
      <description>&lt;P&gt;Thank you for the quick reply!&lt;/P&gt;&lt;P&gt;When filtering for a department&amp;nbsp; "calculate([frequency], ALLSELECTED(Mydata[Department]))" changes and gives the same result as&amp;nbsp;[frequency]. The intention was that this part of the formula should be unaffected by the departmet filtering.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Changing from "all" to "allselected" doesn't help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Chr.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:25:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1044577#M14064</guid>
      <dc:creator>christianirgens</dc:creator>
      <dc:date>2020-04-23T14:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1044601#M14069</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="56621" data-lia-user-login="christianirgens" class="lia-mention lia-mention-user"&gt;christianirgens&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide some example ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:35:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1044601#M14069</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-04-23T14:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1045329#M14099</link>
      <description>&lt;P&gt;The below constructed example illustrates the problem:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The graph and Card both shows FrequencyAll = calculate([Frequency];all(Mydata[Department])). Department is on the x-axis of the graph. I've clicked on the first department (left most bar) to show that the Frequency change from 0,17 to 0,07 - inspite of the "all-statement". If I click on the different bars the number shows the [Frequency] rather than the [FrequencyAll] . Replacing ALL by ALLSELECTED gives other numbers than [Frequency] in the card - and the numbers still change when clicking on the bars.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formula works as expected if I replace the "department" (in the formula and graph) by some of the other fields in the data set. I'm therefore suspecting some sort of PowerBI errror (either interaction-problems with other measures using the same field, problems with using fields with a very large number of different items or some other issue).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 20:00:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1045329#M14099</guid>
      <dc:creator>christianirgens</dc:creator>
      <dc:date>2020-04-23T20:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1045338#M14100</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="56621" data-lia-user-login="christianirgens" class="lia-mention lia-mention-user"&gt;christianirgens&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to share the pbix ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 20:06:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1045338#M14100</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-04-23T20:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1047250#M14178</link>
      <description>&lt;P&gt;Hi there.&lt;BR /&gt;&lt;BR /&gt;If you build your model correctly, you won't have any problems. Your model currently is not correct. Please, try to watch these first:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=_quTwyvDfG0" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=_quTwyvDfG0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=78d6mwR8GtA" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=78d6mwR8GtA&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Once you know what a good model is (think: star schema), please rebuild yours to adhere to Best Practices. Then you'll be able to write correct measures that'll work correctly in all conditions. Storing everything in one big table is a sure way to fail miserably.&lt;BR /&gt;&lt;BR /&gt;Power BI does not have a problem. You have to understand first how DAX and filtering work.&lt;BR /&gt;&lt;BR /&gt;If you have a good model (ONLY THEN), then you can do something similar to this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Person Count] = countrows( Person )

[Expected Incident Count] =
	[Person Count]
	* calculate(
		[Frequency],
		all( Person )
	)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;The above works correctly on the assumption that there's a dimension called Person (could be called Employee as well) and one of the columns holds the department in which the person works.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 14:54:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1047250#M14178</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-24T14:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1048500#M14271</link>
      <description>&lt;P&gt;Thank you for looking into this.&lt;BR /&gt;I agree bad model design is a plausible explanation. Everything is stored in one (small:-))) table however, and the report works nicely for all other purposes. The measure I'm struggling with also works if I replace department by other dimensions. I also believe it used to work for "department" - and am therefore suspecting some sort of PowerBI bug.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2020 17:37:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1048500#M14271</guid>
      <dc:creator>christianirgens</dc:creator>
      <dc:date>2020-04-25T17:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All only responds to grouping / implicit filtering</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1048559#M14274</link>
      <description>Please try to remember this one golden rule of DAX programming: ALWAYS, ALWAYS, ALWAYS use a star schema, no matter how small your model is. If you want to see what can happen if you don't use it, please have a look at this:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/understanding-dax-auto-exist/" target="_blank"&gt;https://www.sqlbi.com/articles/understanding-dax-auto-exist/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please read this well, let it sink in, and never again be tempted to by-pass the necessary step of creating a good star-schema model.&lt;BR /&gt;&lt;BR /&gt;You'll thank me later.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Sat, 25 Apr 2020 18:28:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-only-responds-to-grouping-implicit-filtering/m-p/1048559#M14274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-25T18:28:37Z</dc:date>
    </item>
  </channel>
</rss>

