<?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: Simple measure prolbem in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3303262#M43242</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397018"&gt;@Marcin82&lt;/a&gt;- Hi, try using ALLEXCEPT instead of ALL. The ALLEXCEPT function will keep all context filters except for those specified, so it will maintain the order context while calculating the item count.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ItemCount = 
CALCULATE(
    COUNT(Sales_order_item[item_id]),
    ALLEXCEPT(Sales_order_item, Sales_order_item[OrderNumber])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post helps to find solution would be happy if you could mark my post as a solution and give it a thumbs up&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manoj Nair&lt;BR /&gt;Linkedin - &lt;A href="https://www.linkedin.com/in/manoj-nair-%E2%98%81-344666104/" target="_blank" rel="noopener"&gt;https://www.linkedin.com/in/manoj-nair-%E2%98%81-344666104/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2023 22:44:31 GMT</pubDate>
    <dc:creator>Manoj_Nair</dc:creator>
    <dc:date>2023-06-26T22:44:31Z</dc:date>
    <item>
      <title>Simple measure prolbem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3299902#M43214</link>
      <description>&lt;P&gt;I got two tables. One Is OrderNumber (with distinct values) and second is Sales Order Items. I built a matrix with order number from OrderNumber and itemnumber from Sales Order Items. One order can have many items of course. At every row of the the matrix I just want to have a number of items for this order. I needed to remove filter from order item column so as it&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales_order_item&lt;/SPAN&gt;&lt;SPAN&gt;[item_id]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Sales_order_item&lt;/SPAN&gt;&lt;SPAN&gt;[item_id]&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;)&lt;BR /&gt;But the measure completely destroys the matrix. Now, under every order I see all possible items. Why is that???&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Jun 2023 13:44:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3299902#M43214</guid>
      <dc:creator>Marcin82</dc:creator>
      <dc:date>2023-06-23T13:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Simple measure prolbem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3301609#M43227</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397018"&gt;@Marcin82&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Can you please share your sample dataset and expected output so that I can help you with an accurate solution.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 05:39:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3301609#M43227</guid>
      <dc:creator>Dhairya</dc:creator>
      <dc:date>2023-06-26T05:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Simple measure prolbem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3303262#M43242</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397018"&gt;@Marcin82&lt;/a&gt;- Hi, try using ALLEXCEPT instead of ALL. The ALLEXCEPT function will keep all context filters except for those specified, so it will maintain the order context while calculating the item count.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ItemCount = 
CALCULATE(
    COUNT(Sales_order_item[item_id]),
    ALLEXCEPT(Sales_order_item, Sales_order_item[OrderNumber])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post helps to find solution would be happy if you could mark my post as a solution and give it a thumbs up&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Manoj Nair&lt;BR /&gt;Linkedin - &lt;A href="https://www.linkedin.com/in/manoj-nair-%E2%98%81-344666104/" target="_blank" rel="noopener"&gt;https://www.linkedin.com/in/manoj-nair-%E2%98%81-344666104/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 22:44:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3303262#M43242</guid>
      <dc:creator>Manoj_Nair</dc:creator>
      <dc:date>2023-06-26T22:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simple measure prolbem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3306952#M43289</link>
      <description>&lt;P&gt;Doesn't work. I still see all possible items under order. My measure works when orderNumber is from same table as item. If it comes from "higher level" table (one side realtion) it shows all items under order.&amp;nbsp; SImple need huge problem in DAX, as always.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 21:31:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3306952#M43289</guid>
      <dc:creator>Marcin82</dc:creator>
      <dc:date>2023-06-28T21:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Simple measure prolbem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3306961#M43290</link>
      <description>&lt;P&gt;I would like to have only relevant items under order with count of all of them.&amp;nbsp;&lt;BR /&gt;I achieved it when I add VALUES(OrderNo) from OrderItems table&amp;nbsp;&lt;SPAN&gt;as a CALCULATE argument . But why I get such a mess without it? There is a filter in the context from OrderNumber (but from other table). It should still be kept. Measure only removes filter on items.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Zrzut ekranu 2023-06-28 233425.png" style="width: 575px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/934867i24599AFEAEF21642/image-dimensions/575x434?v=v2" width="575" height="434" role="button" title="Zrzut ekranu 2023-06-28 233425.png" alt="Zrzut ekranu 2023-06-28 233425.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 21:44:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Simple-measure-prolbem/m-p/3306961#M43290</guid>
      <dc:creator>Marcin82</dc:creator>
      <dc:date>2023-06-28T21:44:35Z</dc:date>
    </item>
  </channel>
</rss>

