<?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: Same measure fails to produce correct aggregation. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1488604#M28554</link>
    <description>&lt;P&gt;So the measure '&lt;EM&gt;Project Count From Project Status&lt;/EM&gt;' works because the ProjectId is coming Project Status?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Project Count From Project Status = COUNT([ProjectId])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I thought measures were table agnostic?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So if a add another table called ProjectMember, would I have to code another measure to calculate the number of projects a person belongs to?&lt;BR /&gt;Isn't there a way to craft &lt;STRONG&gt;one&lt;/STRONG&gt; measure to calculate the number of projects which would show the correct count whether you're looking at project status or project members?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 12 Nov 2020 02:29:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-12T02:29:08Z</dc:date>
    <item>
      <title>Same measure fails to produce correct aggregation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1488421#M28545</link>
      <description>&lt;P&gt;I have imported two tables into Power BI and created a 1:M relationship between Project and Project Status.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created two measures containing the expression COUNT([ProjectId]) under the Project and ProjectStatus queries called 'Project Count From Project' and 'Project Count From Project Status'.&lt;/P&gt;&lt;P&gt;However the result 'Project Count From Project' shows all the rows. In my scenario how can I create one measure which will give me the correct result whether I'm counting number of projects by status or number of projects a project member participates in.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm very keen to understand why the 'Project Count From Project' measure doesn't work. It would be nice not to have to create different measures which are used for the same purpose, ie, to count the number of projects according to the context filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 02:30:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1488421#M28545</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T02:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Same measure fails to produce correct aggregation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1488460#M28549</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are placing ProjectStatus[Status] on the rows of the visual. That determines your filter context. The filtering propagates from the Project to the ProjectStatus table, not otherwise. Since the Project table is not affected by the filter context COUNT(Project[ProjectID]) returns the number of rows in the unfiltered table, i.e., 3&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 01:09:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1488460#M28549</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-11-12T01:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Same measure fails to produce correct aggregation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1488604#M28554</link>
      <description>&lt;P&gt;So the measure '&lt;EM&gt;Project Count From Project Status&lt;/EM&gt;' works because the ProjectId is coming Project Status?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Project Count From Project Status = COUNT([ProjectId])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I thought measures were table agnostic?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So if a add another table called ProjectMember, would I have to code another measure to calculate the number of projects a person belongs to?&lt;BR /&gt;Isn't there a way to craft &lt;STRONG&gt;one&lt;/STRONG&gt; measure to calculate the number of projects which would show the correct count whether you're looking at project status or project members?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Nov 2020 02:29:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1488604#M28554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T02:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Same measure fails to produce correct aggregation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1489129#M28581</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how the propagation of filters works, the Cross filter direction is set to single.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could wrap your Count measure from the Project table with a Calculate and use the Crossfilter function to change, just for this particular Count, the direction to Both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Project Count From Project =&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;BR /&gt;COUNT(Project[ProjectId]);&lt;BR /&gt;CROSSFILTER(Project[ProjectId];ProjectStatus[ProjectID];Both)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;J. Payeras&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 14:45:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1489129#M28581</guid>
      <dc:creator>Payeras_BI</dc:creator>
      <dc:date>2020-11-12T14:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Same measure fails to produce correct aggregation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1489558#M28599</link>
      <description>&lt;P&gt;Thank you, J. Payeras for your reply.&lt;/P&gt;&lt;P&gt;Your solution would work, however I'm after a solution that can give me one measure that would work across the board. In my post I mentioned the need to do the same thing for ProjectMembers query. Does that mean I would have to create another ProjectCount measure to work ProjectMembers, and then another ProjectCount measure to work with...hmmm&lt;/P&gt;&lt;P&gt;Perhaps my problem is that my data model doesn't follow a typical star schema model, instead it's just transactional normalised model.&lt;BR /&gt;Given my limited knowledge of DAX, the only option to get away with only one measure for ProjectCount is by changing relationship to bidirectional - I know that comes with drawbacks.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 10:22:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1489558#M28599</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T10:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Same measure fails to produce correct aggregation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1489565#M28601</link>
      <description>&lt;P&gt;The golden rule of data modeling says that models should be dimensional. It means you should follow these practices:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/guidance/star-schema" target="_blank"&gt;https://docs.microsoft.com/en-us/power-bi/guidance/star-schema&lt;/A&gt;. And you should keep your fact tables hidden, only dimensions sholud be used for slicing and dicing.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 10:15:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1489565#M28601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T10:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Same measure fails to produce correct aggregation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1489586#M28603</link>
      <description>&lt;P&gt;I'm with you, daxer. Unfortunately I'm not allowed to implement a typical star-schema model. I have to produce Power Bi reports off a fully normalised OLTP database designed for updates not for reporting. Tough.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 10:20:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-measure-fails-to-produce-correct-aggregation/m-p/1489586#M28603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-12T10:20:21Z</dc:date>
    </item>
  </channel>
</rss>

