<?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: I need a Help using DAX I wanted Equally Split Sold Qty in each month within pooled Territory in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3803035#M148693</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="620866" data-lia-user-login="VikcyD" class="lia-mention lia-mention-user"&gt;VikcyD&lt;/a&gt;,&amp;nbsp;the solution I have provided is achieved with DAX (creating a calculated column)&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2024 20:49:07 GMT</pubDate>
    <dc:creator>Zang_Mi</dc:creator>
    <dc:date>2024-04-01T20:49:07Z</dc:date>
    <item>
      <title>I need a Help using DAX I wanted Equally Split Sold Qty in each month within pooled Territory</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3799600#M148529</link>
      <description>&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;&lt;STRONG&gt;I have a requirement where the expected output is to divide any quantity sold in a pooled city into percentage ratios, and then add these ratios for each month, day, or quarter. I would appreciate any insights or solutions on how to achieve this using DAX / PQ&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Mar 2024 18:15:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3799600#M148529</guid>
      <dc:creator>VikcyD</dc:creator>
      <dc:date>2024-03-29T18:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: I need a Help using DAX I wanted Equally Split Sold Qty in each month within pooled Territory</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3800262#M148555</link>
      <description>&lt;P&gt;Hello, this is an example with the result you are looking for.&amp;nbsp;I've used DAX to do the calculation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;First, I create two queries to load the data I need.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Pooled City (% of split per city)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcknNychU0lEyNlBVitWJVnIvLUpPzM9DEvFILKpMzEsEipiARGIB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Pooled City" = _t, #"% of Split" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Pooled City", type text}, {"% of Split", Percentage.Type}})
in
    #"Changed Type"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quantity (quantity per month and city)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8krMU9JR8i3NTUrMBDIMDQwMlGJ1YOIuqTkZYGEjFGH30qL0xPw8iHokcY/EosrEvEQgCyzolpqE1WyIONxsCxRhhNlIgsgGxwIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Month = _t, City = _t, Qty = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Month", type text}, {"City", type text}, {"Qty", Int64.Type}})
in
    #"Changed Type"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Then, I related two tables as shown belong (Pooled City -&amp;gt; City)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Finally, I create a calculated column with this expression in Quantity table.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Final output = 
VAR __SPLIT_PCT = RELATED('Pooled City'[% of Split])
VAR __POOLED_QTY = CALCULATE(SUMX(Quantity, Quantity[Qty]), KEEPFILTERS(FILTER(Quantity, RELATED('Pooled City'[% of Split]) &amp;lt;&amp;gt; BLANK())), ALLEXCEPT(Quantity, Quantity[Month]))
RETURN IF(ISBLANK(__SPLIT_PCT), Quantity[Qty], __SPLIT_PCT*__POOLED_QTY)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How the measure obtain the correct result:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;__SPLIT_PCT. Obtain for each row (city), the % split from another table, it returns blank if the city is not a pooled city.&lt;/LI&gt;&lt;LI&gt;__POOLED_QTY. This variable return, within the given month, the sum of pooled city for each pooled city. It returns blank if the city is not a pooled city.&lt;/LI&gt;&lt;LI&gt;In the last step, we apply the logic: if it is not a pooled city, we just take the value from Quantity column, otherwise, it should be the product of sum of pooled city and % split.&lt;/LI&gt;&lt;/OL&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;If this answer helps you, please give a kudo and mark it as solution&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 11:11:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3800262#M148555</guid>
      <dc:creator>Zang_Mi</dc:creator>
      <dc:date>2024-03-30T11:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: I need a Help using DAX I wanted Equally Split Sold Qty in each month within pooled Territory</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3800636#M148581</link>
      <description>&lt;P&gt;Thanks for the PQ Solution, it's really helpful and I appreciate this kind of support. Would it be possible to solve it using DAX as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2024 04:10:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3800636#M148581</guid>
      <dc:creator>VikcyD</dc:creator>
      <dc:date>2024-03-31T04:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: I need a Help using DAX I wanted Equally Split Sold Qty in each month within pooled Territory</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3803035#M148693</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="620866" data-lia-user-login="VikcyD" class="lia-mention lia-mention-user"&gt;VikcyD&lt;/a&gt;,&amp;nbsp;the solution I have provided is achieved with DAX (creating a calculated column)&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 20:49:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/3803035#M148693</guid>
      <dc:creator>Zang_Mi</dc:creator>
      <dc:date>2024-04-01T20:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: I need a Help using DAX I wanted Equally Split Sold Qty in each month within pooled Territory</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/4113437#M163255</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="713905" data-lia-user-login="Zang_Mi" class="lia-mention lia-mention-user"&gt;Zang_Mi&lt;/a&gt;&amp;nbsp; &lt;SPAN&gt;It seems there’s an issue with the formula. When I apply the same formula, it only multiplies the value for the respective HQ by the percentage, instead of summing the total and then multiplying. Please Help&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Data Model :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 12:14:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-need-a-Help-using-DAX-I-wanted-Equally-Split-Sold-Qty-in-each/m-p/4113437#M163255</guid>
      <dc:creator>VikcyD</dc:creator>
      <dc:date>2024-08-22T12:14:15Z</dc:date>
    </item>
  </channel>
</rss>

