<?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: FILTER to work differently in DAX Studio / PowerBI? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1958747#M42788</link>
    <description>&lt;P&gt;Good morning, and thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that article - and tried, but never achieved the results I expected to have otherwise.&lt;/P&gt;&lt;P&gt;Using addcolumns(....) gave far higher distinct counts, giving reason to believe that the filter context (at least in my code), was different when doing the calculation outside the summarize...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is also my own problem, that there is no more info to go with, as I said - I don't get error messages I just get different results from DAX studio and PowerBI. What would it be you're missing as info?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 04:32:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-15T04:32:20Z</dc:date>
    <item>
      <title>FILTER to work differently in DAX Studio / PowerBI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1957234#M42727</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yesterday I managed to make a quite complex code in DAX Studio (at least for my expertise level) and was very happy to be working.&lt;/P&gt;&lt;P&gt;After transfering to PowerBI measure it worked differently, however. Here my minimum/anonymized example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Background&lt;/STRONG&gt;: I'm trying to summarize the different LOTs used in a given production run. I've got a table for the production main data plus another related for the compounds (and batches) used in that. This second table can be viewed as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[PkID]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[CompoundName]&amp;nbsp; &amp;nbsp; &amp;nbsp;[Batch]&lt;/P&gt;&lt;P&gt;123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompName1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;BR /&gt;123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompName2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;/P&gt;&lt;P&gt;123&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompName3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C&lt;/P&gt;&lt;P&gt;124&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompName1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;BR /&gt;124&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompName2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;D&lt;/P&gt;&lt;P&gt;124&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompName3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;E&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Targeted result:&amp;nbsp;&lt;/STRONG&gt;I'd like to have a table filtered to only those compounds that did change from previous to current prod. run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution path (so far):&amp;nbsp;&lt;/STRONG&gt;I used "Summarize" to group the above example table by CompName and calculate the distinctcount of batches.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR content = &amp;lt;sets the filter context of current and previous production run&amp;gt;&lt;/P&gt;&lt;P&gt;VAR output = FILTER(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUMMARIZE(CALCULATETABLE(Table2,content,ALL(Table2)),[CompName],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "cnt",DISTINCTCOUNT(Table2[Batch])),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [cnt] &amp;gt; 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current Issue:&amp;nbsp;&lt;/STRONG&gt;The result is fine in DAX Studio. It returns a table with only rows for CompName1 and CompName2 (excluding CompName3, as its distinct batch count = 1). However, transferring this to PowerBI&amp;nbsp; I converted that table just to "COUNTROWS(output)" to retrieve a scalar, but I am getting a 3 whatever I do... no error message...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In DAX Studio it is all fine - but why isn't the FILTER not working in PowerBI?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 11:39:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1957234#M42727</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-14T11:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER to work differently in DAX Studio / PowerBI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1957750#M42753</link>
      <description>&lt;P&gt;First and foremost, you should never use SUMMARIZE to do anything else in it but grouping rows. No calulations should be performed. If you want to know why, you can get familiar with this:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/all-the-secrets-of-summarize/" target="_blank"&gt;https://www.sqlbi.com/articles/all-the-secrets-of-summarize/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, with the amount of info you've shown it's hardly possible to diagnose any problems...&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 14:59:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1957750#M42753</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-07-14T14:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER to work differently in DAX Studio / PowerBI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1958747#M42788</link>
      <description>&lt;P&gt;Good morning, and thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that article - and tried, but never achieved the results I expected to have otherwise.&lt;/P&gt;&lt;P&gt;Using addcolumns(....) gave far higher distinct counts, giving reason to believe that the filter context (at least in my code), was different when doing the calculation outside the summarize...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is also my own problem, that there is no more info to go with, as I said - I don't get error messages I just get different results from DAX studio and PowerBI. What would it be you're missing as info?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 04:32:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1958747#M42788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-15T04:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER to work differently in DAX Studio / PowerBI?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1960800#M42881</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your problem must be reproducible on my end. Then and only then will I be able to do anything about it.... Without any concrete data I can't do much.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 20:14:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-to-work-differently-in-DAX-Studio-PowerBI/m-p/1960800#M42881</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-07-15T20:14:13Z</dc:date>
    </item>
  </channel>
</rss>

