<?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: Divide column based on other two columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/892521#M7913</link>
    <description>&lt;P&gt;In Power Query Editor screen, select column CY_B_VOL and click on Fill (Down) in the Transform tab:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Then click Close &amp;amp; Apply and add a calculated column to your table:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CalculatedColumn = 
VAR _curMonth = Table[Month_of_Year]
RETURN
DIVIDE(Table[CY_B_Vol], COUNTROWS(FILTER(ALL(Table), Table[Month_of_Year] = _curMonth)))&lt;/LI-CODE&gt;&lt;P&gt;Let me know if this works &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;Kind regards&lt;/P&gt;&lt;P&gt;Djerro123&lt;/P&gt;&lt;P&gt;-------------------------------&lt;/P&gt;&lt;P&gt;If this answered your question, please &lt;STRONG&gt;mark it as the Solution&lt;/STRONG&gt;. This also helps others to find what they are looking for.&lt;/P&gt;&lt;P&gt;Keep those &lt;STRONG&gt;thumbs up&lt;/STRONG&gt; coming! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2020 19:57:13 GMT</pubDate>
    <dc:creator>JarroVGIT</dc:creator>
    <dc:date>2020-01-07T19:57:13Z</dc:date>
    <item>
      <title>Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/892394#M7907</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hi guys,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I have this table below, the only in my model. As you can see, the Volume (CY_B_Vol) only shows in the first week of each month.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I would like then to be split in weeks according to how many weeks we have in a month (if the month has 5 weeks, split (CY_B_Vol) by 20 if the month has 4 weeks split (CY_B_Vol) by 25), like in the yellow column.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;img /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&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;&amp;nbsp;&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;&amp;nbsp;&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;&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;FONT face="arial,helvetica,sans-serif"&gt;It seems like a simple thing to do, but I've been struggling with this for 2 days without a solution.&amp;nbsp;&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":frowning_face:"&gt;☹️&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Could anybody help me, please?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thanks!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 18:14:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/892394#M7907</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-07T18:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/892521#M7913</link>
      <description>&lt;P&gt;In Power Query Editor screen, select column CY_B_VOL and click on Fill (Down) in the Transform tab:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Then click Close &amp;amp; Apply and add a calculated column to your table:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CalculatedColumn = 
VAR _curMonth = Table[Month_of_Year]
RETURN
DIVIDE(Table[CY_B_Vol], COUNTROWS(FILTER(ALL(Table), Table[Month_of_Year] = _curMonth)))&lt;/LI-CODE&gt;&lt;P&gt;Let me know if this works &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;Kind regards&lt;/P&gt;&lt;P&gt;Djerro123&lt;/P&gt;&lt;P&gt;-------------------------------&lt;/P&gt;&lt;P&gt;If this answered your question, please &lt;STRONG&gt;mark it as the Solution&lt;/STRONG&gt;. This also helps others to find what they are looking for.&lt;/P&gt;&lt;P&gt;Keep those &lt;STRONG&gt;thumbs up&lt;/STRONG&gt; coming! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 19:57:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/892521#M7913</guid>
      <dc:creator>JarroVGIT</dc:creator>
      <dc:date>2020-01-07T19:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/893882#M7981</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="137611" data-lia-user-login="JarroVGIT" class="lia-mention lia-mention-user"&gt;JarroVGIT&lt;/a&gt;, thanks for your quick reply.&lt;BR /&gt;&lt;BR /&gt;It actually didn't work. =/&lt;BR /&gt;&lt;BR /&gt;First, the volume should not fill down, as I want the count to be done with the first value only.&lt;BR /&gt;&lt;BR /&gt;Second, I need to divide the volume that appears in the first week of each month.&lt;BR /&gt;&lt;BR /&gt;If the month is equal to 3,6,9 or 12, I would divide by 20, the others I would divide by 25.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Anyhow, I appreciate your help &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 17:40:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/893882#M7981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-08T17:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/893915#M7986</link>
      <description>&lt;P&gt;Does your current model look like the table you gave us but without the yellow column? Or did I understand your question wrong? I assumed you have the white columns and you wanted the yellow column. Or are you missing the weeknumbers as well?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 18:20:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/893915#M7986</guid>
      <dc:creator>JarroVGIT</dc:creator>
      <dc:date>2020-01-08T18:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894338#M7998</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="137611" data-lia-user-login="JarroVGIT" class="lia-mention lia-mention-user"&gt;JarroVGIT&lt;/a&gt;&amp;nbsp;, tks again &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does your current model look like the table you gave us but without the yellow column? Correct! The yellow column is exactly what I want.&lt;BR /&gt;Or did I understand your question wrong? I assumed you have the white columns and you wanted the yellow column. Correct again&lt;BR /&gt;Or are you missing the weeknumbers as well? No, I'm not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As you can notice, I'm a newbie. I don't know if my logic is good, but I thought maybe get the minimum value for the week (where the month is equal the selected one and divide (with if based on the month as well); however, I'm still trying to accomplish this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I really appreciate your patience and attention &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 03:08:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894338#M7998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-09T03:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894405#M8000</link>
      <description>Alright then my initial response gets you that yellow column. If you want the columns to be in there original state, please create a copy of column CY_B_Vol before using the Fill option in the Powerquery editor.</description>
      <pubDate>Thu, 09 Jan 2020 05:10:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894405#M8000</guid>
      <dc:creator>JarroVGIT</dc:creator>
      <dc:date>2020-01-09T05:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894409#M8001</link>
      <description>Or paste your PBIX file and I'll show it to you</description>
      <pubDate>Thu, 09 Jan 2020 05:12:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894409#M8001</guid>
      <dc:creator>JarroVGIT</dc:creator>
      <dc:date>2020-01-09T05:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894460#M8006</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="137611" data-lia-user-login="JarroVGIT" class="lia-mention lia-mention-user"&gt;JarroVGIT&lt;/a&gt;&amp;nbsp;, unfortunately not. =/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is what I get in my file doing exactly what you said.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 06:08:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894460#M8006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-09T06:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894522#M8007</link>
      <description>Can you share your pbix file by sharing a Dropbox/Google drive/OneDrive link? Your results are not in line with documented power bi behavior so the error must be somewhere else.</description>
      <pubDate>Thu, 09 Jan 2020 07:09:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894522#M8007</guid>
      <dc:creator>JarroVGIT</dc:creator>
      <dc:date>2020-01-09T07:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Divide column based on other two columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894703#M8013</link>
      <description>&lt;P&gt;Hi , Try below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly create a calculated column with below dax for filling all the rows&amp;nbsp; Column 2 = var cur='Table'[monthofyear] return if('Table'[monthofyear]=cur,(calculate(sum('Table'[cy-b-col]),filter('Table','Table'[monthofyear]=cur))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second Create an calculated TABLE with below dax and create a relationship between main table and this table with [monthofyear] Output = SUMMARIZE ( 'Table','Table'[monthofyear], "Count value", COUNT ( 'Table'[monthofyear] ) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now final create a calculated column as below CalculatedColumn = DIVIDE('Table'[Column 2],if(RELATED(Output[Count value])=5,20,25))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;..Its a bit lengthy but will serve your purpose...&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 09:14:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Divide-column-based-on-other-two-columns/m-p/894703#M8013</guid>
      <dc:creator>Parisha</dc:creator>
      <dc:date>2020-01-09T09:14:44Z</dc:date>
    </item>
  </channel>
</rss>

