<?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 Count percentage of products from each material in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267420#M55029</link>
    <description>&lt;P&gt;Hello community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In previous post we had problem with calculating percentage of products from raw materials.&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;helped us to solve this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now we have another problem, which is as following:&lt;/P&gt;&lt;P&gt;Our table consists of ready products and materials. We figured out in previous case how to count percentage of products from materials. For example:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;15&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;100&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;To count percentage we need to divide product with material, so we do this as Product1 (5)/material (100)=5%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current prolem is that in some cases we have not one, but several rows with materials and we need to find out how many percents does product contain in every material.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Product 1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;product 2&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;product 3&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;material 1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;material 2&lt;/TD&gt;&lt;TD&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So as result we need to figure out what percentage of each product contains in each material.&lt;/P&gt;&lt;P&gt;Product 1 has 5% in material 1 and 4,5 percent in material 2 for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For that purpose i think we need to create some virtual table that will write down the results for each product in each material, but I dont know how to do so, please help me solve this case.&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/13nzRvMDclvNYtzOodFmzH_mcz3JsY8y8/view?usp=sharing" target="_self"&gt;Example pbix&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 13:25:52 GMT</pubDate>
    <dc:creator>DimaMD</dc:creator>
    <dc:date>2022-01-05T13:25:52Z</dc:date>
    <item>
      <title>Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267420#M55029</link>
      <description>&lt;P&gt;Hello community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In previous post we had problem with calculating percentage of products from raw materials.&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;helped us to solve this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now we have another problem, which is as following:&lt;/P&gt;&lt;P&gt;Our table consists of ready products and materials. We figured out in previous case how to count percentage of products from materials. For example:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;15&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;100&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;To count percentage we need to divide product with material, so we do this as Product1 (5)/material (100)=5%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current prolem is that in some cases we have not one, but several rows with materials and we need to find out how many percents does product contain in every material.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Product 1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;product 2&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;product 3&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;material 1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;material 2&lt;/TD&gt;&lt;TD&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So as result we need to figure out what percentage of each product contains in each material.&lt;/P&gt;&lt;P&gt;Product 1 has 5% in material 1 and 4,5 percent in material 2 for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For that purpose i think we need to create some virtual table that will write down the results for each product in each material, but I dont know how to do so, please help me solve this case.&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/13nzRvMDclvNYtzOodFmzH_mcz3JsY8y8/view?usp=sharing" target="_self"&gt;Example pbix&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 13:25:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267420#M55029</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2022-01-05T13:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267481#M55033</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312820" data-lia-user-login="DimaMD" class="lia-mention lia-mention-user"&gt;DimaMD&lt;/a&gt;&amp;nbsp; I am not understanding the requirement&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 14:18:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267481#M55033</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-01-05T14:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267515#M55039</link>
      <description>&lt;P&gt;Hi, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Maybe i didnt describe our problem correctly but I will try in another example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The default table looks as following&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Product 1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material 1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material 2&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We need to calculate percentage of products in each material, so result should be as following:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Material1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;15%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material1&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;25%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material2&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;Product 1&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;7,5%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material2&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;Product 2&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Material2&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;Product 3&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;12,5%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have similar table in example file table "Plan" attached in previous post&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 14:36:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267515#M55039</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2022-01-05T14:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267755#M55061</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312820" data-lia-user-login="DimaMD" class="lia-mention lia-mention-user"&gt;DimaMD&lt;/a&gt;&amp;nbsp; sorry it is still ot clear to me. Can you please create a fresh pbix and clearly explain the ask.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 16:12:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2267755#M55061</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-01-05T16:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2269175#M55164</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have changed our example file to be more understandable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1 (Plan) has ID_specification, ID_product and Coefficient&lt;/P&gt;&lt;P&gt;Table 2 (Table) has ID_product, ammount, type, ID_Specification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both tables are connected with ID_specification and both have ID_Product. The difference is that "Plan" table has coefficient in every ID_product.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to make a mesure that will multiply coefficient from "Plan" with ammount of "material" in "Table" so that we can see (write down in matrix table near every product) what amount of "readyproduct" we will have, depending on what "ID_Specification" we use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to explain this on screenshot&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Step 1: We take ID of products and coefficient from table "Plan" so we can further mutiply coefficient with amount of material&lt;/P&gt;&lt;P&gt;Step 2: we take ID_specification from "Plan" table and connect it with "Table", where it is related with materials&lt;/P&gt;&lt;P&gt;Step 3: we need to create mesure that will help us to make matrix table with ID product, ID specification and amount of products, that will be calculated as "Coefficient of productID (related to specification)" * "amount of material (with same ID specification)"&lt;/P&gt;&lt;P&gt;Step 4 is our goal: We need to summarize amount of products with same ID that were calculated in step 3 and divide it with total material ammount, so we will see "total plan percentage"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will attach both PBIX and Excel files examples so you can see all concept. I understand that my explanation is quite difficult but I dont know how to do it in other way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/13nzRvMDclvNYtzOodFmzH_mcz3JsY8y8/view?usp=sharing" target="_self"&gt;&lt;STRONG&gt;EXAMPLE PBIX FILE&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.google.com/spreadsheets/d/1PqhDkbl1C2erxSndoZDGw2niNs5c-a2l/edit?usp=sharing&amp;amp;ouid=105424184413393307520&amp;amp;rtpof=true&amp;amp;sd=true" target="_self"&gt;&lt;STRONG&gt;EXAMPLE EXCEL FILE&lt;/STRONG&gt;&lt;/A&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;</description>
      <pubDate>Thu, 06 Jan 2022 10:12:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2269175#M55164</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2022-01-06T10:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2269604#M55194</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312820" data-lia-user-login="DimaMD" class="lia-mention lia-mention-user"&gt;DimaMD&lt;/a&gt;&amp;nbsp; please refer to the attached pbix,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I looked into the spreadhseet and replicated the output, not that I completely understood it. Why are you showing the output only for &lt;EM&gt;&lt;STRONG&gt;ID_Product=51 and not for&amp;nbsp;ID_Product=50&lt;/STRONG&gt;&lt;/EM&gt;, I still don't know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, this is the output which is identical to the excel&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 14:33:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2269604#M55194</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-01-06T14:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2275035#M55493</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;When we used your mesure in example file, it worked properly. But when we tried it in our orginal file it doesnt work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For that reason we added additional data in example files, and it also didnt make correct result. So the previous example worked ok, but when you add more data - it doesnt work. After adding more data connection between two tables changed to "many to many".&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Additional question (after soving previous problem) is can we show results in one matrix table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example file with more data you can find below&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/13nzRvMDclvNYtzOodFmzH_mcz3JsY8y8/view?usp=sharing" target="_self" rel="nofollow noreferrer"&gt;EXAMPLE PBIX FILE&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 09:43:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2275035#M55493</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2022-01-10T09:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2275449#M55529</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312820" data-lia-user-login="DimaMD" class="lia-mention lia-mention-user"&gt;DimaMD&lt;/a&gt;&amp;nbsp; the basics of data- modelling advises never to use many-to-many relationship.&lt;/P&gt;
&lt;P&gt;You need to use a bridging table and a star schema to build a proper data model first.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 13:53:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2275449#M55529</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-01-10T13:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2276109#M55564</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;We made changes in our scheme and created bridging table (product)&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;After making this we are trying to filter our table with DocumentID, but filter doesnt work, instead collums calculates summary of product quantity and material quantity from whole table (from every document ID). We need this filter to work, but dont know how to do this while using solutions we discussed above.&lt;/P&gt;&lt;P&gt;If we have only one DocumentID everything works just fine, but when we add several other documentID's and trying to show results of them seperately by filtering documentID, filter doesnt work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made some changes in mesure, you can see all data in example file below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to solve this task&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/13nzRvMDclvNYtzOodFmzH_mcz3JsY8y8/view?usp=sharing" target="_self"&gt;Example file&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 19:37:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2276109#M55564</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2022-01-10T19:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count percentage of products from each material</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2277291#M55614</link>
      <description>&lt;P&gt;Hello community!&lt;BR /&gt;Thanks for help&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;. We found solution to solve our task.&amp;nbsp;&lt;/P&gt;&lt;P&gt;After making some changes in calculations we have result that we needed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to properly calculate quantity of materials per every specificationID and documentID&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;base = 
var _amtTbl = CALCULATE(SUM('Table'[Amount]),'Table'[Type] = "Material",TREATAS(VALUES(Plan[ID_Specification]),'Table'[ID_Specification]),REMOVEFILTERS('Product'[ID_Product]))
var _coefficientPlan = SUM(Plan[Coefficient])
return _coefficientPlan*_amtTbl


New_base = 
IF(
    HASONEVALUE(Plan[ID_Specification]),
    [base],
    SUMX(VALUES(Plan[ID_Specification]),
    [base]))&lt;/LI-CODE&gt;&lt;P&gt;Next we calculated proper percent of product that was in materials.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;%pct = 
var _numerator = [New_base] 
var _denominator = CALCULATE(SUM('Table'[Amount]),'Table'[Type] = "Material",TREATAS(VALUES(Plan[ID_Specification]),'Table'[ID_Specification]),REMOVEFILTERS('Product'[ID_Product]))
return 
divide(_numerator,_denominator)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for help!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 10:28:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-percentage-of-products-from-each-material/m-p/2277291#M55614</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2022-01-11T10:28:05Z</dc:date>
    </item>
  </channel>
</rss>

