<?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: POwer BI Matrix visual and DAX formula to add new column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3789160#M148048</link>
    <description>&lt;P&gt;Thank you so much it works!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2024 11:18:34 GMT</pubDate>
    <dc:creator>Dimitri70</dc:creator>
    <dc:date>2024-03-25T11:18:34Z</dc:date>
    <item>
      <title>POwer BI Matrix visual and DAX formula to add new column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3788874#M148037</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am trying to summurize in a matrix visual for each of suppliers how many part are shared among different plants and how many parts are not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this raw data:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and below summary I would like to get in a matrix visual:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 08:04:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3788874#M148037</guid>
      <dc:creator>Dimitri70</dc:creator>
      <dc:date>2024-03-25T08:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: POwer BI Matrix visual and DAX formula to add new column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3788887#M148038</link>
      <description>&lt;P&gt;What's you issue? You just need to make 3 measure with distinctcount like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure1= distinctcount(table(plant served))&lt;/P&gt;&lt;P&gt;Measure2= distinctcount(table(part shared))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you put the supplier column and the measure in a matrix or table&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 08:11:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3788887#M148038</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2024-03-25T08:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: POwer BI Matrix visual and DAX formula to add new column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3788905#M148039</link>
      <description>&lt;P&gt;Hello Gabry,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I do as you suggest, I will get the total count of Material by plant but I would like to have separetely the count of material that are shared&amp;nbsp; to different plant.&lt;/P&gt;&lt;P&gt;Exampe material ABC from supplier 100 is common to plant A and B so resutl is 2, while DEF material from supplier 200 is commom to plants A B and C so the total is 3&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 08:23:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3788905#M148039</guid>
      <dc:creator>Dimitri70</dc:creator>
      <dc:date>2024-03-25T08:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: POwer BI Matrix visual and DAX formula to add new column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3789049#M148046</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Here is one way to do this:&lt;BR /&gt;&lt;BR /&gt;I modified the example data a bit.&lt;BR /&gt;Note that this would be easier if you have a dimension table for parts and plants instead of one table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Dax:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Plant Served Count =&lt;/SPAN&gt; &lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (29)'&lt;/SPAN&gt;&lt;SPAN&gt;[Plant Served]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Part Shared = &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;//If material is found is mutiple locations we count it as 1 else 0&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;('Table (29)',&lt;/SPAN&gt;&lt;SPAN&gt;"Materialtest"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; _material = [Material Code]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; _supplier = [Supplier]&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;('Table (29)'[Plant Served]),&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;('Table (29)'),'Table (29)'[Material Code]=_material,'Table (29)'[Supplier]=_supplier)&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;'Table (29)'[Material Code],[Materialtest]),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;[Materialtest])&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Part &lt;/SPAN&gt;&lt;SPAN&gt;not&lt;/SPAN&gt;&lt;SPAN&gt; shared =&lt;/SPAN&gt; &lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (29)'&lt;/SPAN&gt;&lt;SPAN&gt;[Material Code]&lt;/SPAN&gt;&lt;SPAN&gt;)-&lt;/SPAN&gt;&lt;SPAN&gt;[Part Shared]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;End result:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Here material code jkl is not considered as a shared part since it is only used in one factory.&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Mar 2024 09:43:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3789049#M148046</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2024-03-25T09:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: POwer BI Matrix visual and DAX formula to add new column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3789160#M148048</link>
      <description>&lt;P&gt;Thank you so much it works!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 11:18:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/POwer-BI-Matrix-visual-and-DAX-formula-to-add-new-column/m-p/3789160#M148048</guid>
      <dc:creator>Dimitri70</dc:creator>
      <dc:date>2024-03-25T11:18:34Z</dc:date>
    </item>
  </channel>
</rss>

