<?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: Division between tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4134756#M164235</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please provide more details about the problem you're encountering, along with a sample dataset and the expected outcome? This information will be invaluable in comprehending your specific needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Udit&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accepting it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Appreciate your Kudo &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt; Let's Connect: &lt;A href="https://www.linkedin.com/in/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkedIn&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://www.youtube.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;YouTube&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://medium.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Medium&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://github.com/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;GitHub&lt;/STRONG&gt;&lt;/A&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":sparkles:"&gt;✨&lt;/span&gt; Visit My Linktree: &lt;A href="https://linktr.ee/quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkTree&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 06:16:22 GMT</pubDate>
    <dc:creator>quantumudit</dc:creator>
    <dc:date>2024-09-05T06:16:22Z</dc:date>
    <item>
      <title>Division between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4134746#M164233</link>
      <description>&lt;P&gt;Hii,&lt;BR /&gt;I want to divide 2 measures that are in 2 different tables. The division must be for each same month of the same year. For example, we want to divide for the month &lt;U&gt;January 2020 (date1)&lt;/U&gt; the measure1 by the measure2 of the month of &lt;U&gt;January 2020 (date2).&lt;/U&gt;&lt;BR /&gt;So we have:&lt;BR /&gt;Table1[measure1]&lt;BR /&gt;Table2[measure2]&lt;BR /&gt;Table1[date1]&lt;BR /&gt;Table2[date2]&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 06:11:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4134746#M164233</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-09-05T06:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Division between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4134756#M164235</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please provide more details about the problem you're encountering, along with a sample dataset and the expected outcome? This information will be invaluable in comprehending your specific needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Udit&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accepting it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Appreciate your Kudo &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt; Let's Connect: &lt;A href="https://www.linkedin.com/in/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkedIn&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://www.youtube.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;YouTube&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://medium.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Medium&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://github.com/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;GitHub&lt;/STRONG&gt;&lt;/A&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":sparkles:"&gt;✨&lt;/span&gt; Visit My Linktree: &lt;A href="https://linktr.ee/quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkTree&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 06:16:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4134756#M164235</guid>
      <dc:creator>quantumudit</dc:creator>
      <dc:date>2024-09-05T06:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Division between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4135454#M164265</link>
      <description>&lt;P&gt;The division should only be done between the same month of the same year. For example, we should only divide the total number of clothes in the month of January 2010 by the Purchase amount in the month of January 2010.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Table1[measure1] -- COUNT&amp;nbsp;the total number of clothes&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Table2[measure2] -- SUM of&amp;nbsp;amount of&amp;nbsp;the Purchase&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Table1[date1] --&amp;nbsp;Date of arrival&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Table2[date2] --&amp;nbsp;Date of purchase&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 12:36:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4135454#M164265</guid>
      <dc:creator>game1</dc:creator>
      <dc:date>2024-09-05T12:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Division between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4135588#M164272</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears you're encountering issues with data modelling. Here's a solution:&lt;/P&gt;&lt;P&gt;- Establish a separate date table.&lt;/P&gt;&lt;P&gt;- Form a one-to-many relationship between the new date table and Table-1.&lt;/P&gt;&lt;P&gt;- Form a one-to-many relationship between the new date table and Table-2.&lt;/P&gt;&lt;P&gt;- Utilize the dates from the new date table for calculations instead of using dates from the individual tables.&lt;/P&gt;&lt;P&gt;Implementing these steps should resolve your problems. If the issue persists, please provide a small sample of an anonymized dataset along with the expected outcome (either a snapshot or a data table) for further assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Udit&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accepting it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Appreciate your Kudo &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt; Let's Connect: &lt;A href="https://www.linkedin.com/in/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkedIn&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://www.youtube.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;YouTube&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://medium.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Medium&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://github.com/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;GitHub&lt;/STRONG&gt;&lt;/A&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":sparkles:"&gt;✨&lt;/span&gt; Visit My Linktree: &lt;A href="https://linktr.ee/quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkTree&lt;/STRONG&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 13:48:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4135588#M164272</guid>
      <dc:creator>quantumudit</dc:creator>
      <dc:date>2024-09-05T13:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Division between tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4137264#M164340</link>
      <description>&lt;P&gt;I would like to thank quantumudit for the valuable input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659758" data-lia-user-login="game1" class="lia-mention lia-mention-user"&gt;game1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I will add some details by creating simple data to achieve the desired results.&lt;BR /&gt;I have taken the following steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.Create simple data.&lt;/P&gt;
&lt;P&gt;Table1:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table2:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.Create a&amp;nbsp;calendar table:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DateTable = 
ADDCOLUMNS(
    CALENDAR(DATE(2024,1,1), DATE(2024,10,1)),
    "YearMonth", FORMAT([Date], "YYYY-MM")
)
&lt;/LI-CODE&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;3.Create relationships as quantumudit&amp;nbsp; describes:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4.Create three measures:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure1 = COUNT('Table1'[ClothesID])
Measure2 = SUM('Table2'[Sales])
divide = DIVIDE('Table2'[Measure2],'Table1'[Measure1])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5.Use the DateTable's "YearMonth" as a slicer field,and the result is as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Model relationships determine how the data carries out interactions between different tables, and should also follow the principles of the star schema when we model, here are a couple of links that will help you:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand" target="_blank"&gt;Model relationships in Power BI Desktop - Power BI | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/guidance/star-schema" target="_blank"&gt;Understand star schema and the importance for Power BI - Power BI | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Zhu&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 09:46:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Division-between-tables/m-p/4137264#M164340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-06T09:46:17Z</dc:date>
    </item>
  </channel>
</rss>

