<?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: Cumulative and filtered calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887933#M93671</link>
    <description>&lt;P&gt;No, only Super Users can upload. But you can paste a link to a file on a shared drive (OneDrive, Google Drive and so on).&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2022 00:43:21 GMT</pubDate>
    <dc:creator>daXtreme</dc:creator>
    <dc:date>2022-11-07T00:43:21Z</dc:date>
    <item>
      <title>Cumulative and filtered calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887737#M93661</link>
      <description>&lt;P&gt;Hi Colleagues,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need again some help &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;In the DB we have AVG volume, and we use for visualisaton a line and clustered chart.&lt;/P&gt;&lt;P&gt;Tha sales team need another avg (we call it cumulative avg volume). Tha calculation is the following:&lt;/P&gt;&lt;P&gt;AVG volume * number of day in month/ number&amp;nbsp; of day in month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g:&lt;/P&gt;&lt;P&gt;january: 1000*31/31&lt;/P&gt;&lt;P&gt;february: ((1000*31)+(1051*28))/59&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;december: ((1000*31)+(1051*28)+....+(1048*31))/365&lt;/P&gt;&lt;P&gt;This is not problem, we can solve it in pl/sql.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the sales team would like to make filtering for example : May and June, where they would like to see&amp;nbsp;&lt;/P&gt;&lt;P&gt;AVG of May and June: ((1058*31)+(1064*30))/61&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this filtering caused for me some difficulty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have to also calculating margin for these periods, where the methodology is the same, and when we have margin, the we are able to calculate margin%--&amp;gt; margin/ avg volume&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have some tips for solving this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;bálint&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2022 19:40:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887737#M93661</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-06T19:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative and filtered calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887746#M93663</link>
      <description>&lt;P&gt;Sample data/file needed.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2022 19:51:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887746#M93663</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-11-06T19:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative and filtered calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887783#M93665</link>
      <description>&lt;P&gt;ok&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I pbix file upload here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried upload xls, txt, and powebi, but it doesnot work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2022 21:10:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887783#M93665</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-06T21:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative and filtered calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887933#M93671</link>
      <description>&lt;P&gt;No, only Super Users can upload. But you can paste a link to a file on a shared drive (OneDrive, Google Drive and so on).&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 00:43:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2887933#M93671</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-11-07T00:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative and filtered calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2888435#M93692</link>
      <description>&lt;P&gt;Ok, then i make a short table with figures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Yearmonth&lt;/TD&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Number of days in month&lt;/TD&gt;&lt;TD&gt;number of days&lt;/TD&gt;&lt;TD&gt;Volume AVG&lt;/TD&gt;&lt;TD&gt;AVG volume weighted&lt;/TD&gt;&lt;TD&gt;AVG volume weighted cumulative&lt;/TD&gt;&lt;TD&gt;avg cumulative volume&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202201&lt;/TD&gt;&lt;TD&gt;XY&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;100000&lt;/TD&gt;&lt;TD&gt;3100000&lt;/TD&gt;&lt;TD&gt;3100000&lt;/TD&gt;&lt;TD&gt;100000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202202&lt;/TD&gt;&lt;TD&gt;xy&lt;/TD&gt;&lt;TD&gt;28&lt;/TD&gt;&lt;TD&gt;59&lt;/TD&gt;&lt;TD&gt;100030&lt;/TD&gt;&lt;TD&gt;2800840&lt;/TD&gt;&lt;TD&gt;5900840&lt;/TD&gt;&lt;TD&gt;100014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202203&lt;/TD&gt;&lt;TD&gt;xy&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;99874&lt;/TD&gt;&lt;TD&gt;3096094&lt;/TD&gt;&lt;TD&gt;8996934&lt;/TD&gt;&lt;TD&gt;99966&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202204&lt;/TD&gt;&lt;TD&gt;xy&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;96784&lt;/TD&gt;&lt;TD&gt;2903520&lt;/TD&gt;&lt;TD&gt;11900454&lt;/TD&gt;&lt;TD&gt;99170&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202205&lt;/TD&gt;&lt;TD&gt;xy&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;151&lt;/TD&gt;&lt;TD&gt;101234&lt;/TD&gt;&lt;TD&gt;3138254&lt;/TD&gt;&lt;TD&gt;15038708&lt;/TD&gt;&lt;TD&gt;99594&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202206&lt;/TD&gt;&lt;TD&gt;xy&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;181&lt;/TD&gt;&lt;TD&gt;103496&lt;/TD&gt;&lt;TD&gt;3104880&lt;/TD&gt;&lt;TD&gt;18143588&lt;/TD&gt;&lt;TD&gt;100241&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;202207&lt;/TD&gt;&lt;TD&gt;xy&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;212&lt;/TD&gt;&lt;TD&gt;145670&lt;/TD&gt;&lt;TD&gt;4515770&lt;/TD&gt;&lt;TD&gt;22659358&lt;/TD&gt;&lt;TD&gt;106884&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i would like to make a visualisation, where without filtering we can see the avg cumulated avg volume (in the example 202207), but when we filtering for example 202203 and 202204, then (202203 avg volume*31 + 202204avg volume * 30)/61.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 07:09:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2888435#M93692</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-07T07:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative and filtered calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2888462#M93694</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AvgCumulativeVolume=DIVIDE(SUMX('Sample','Sample'[Number of days in month]*'Sample'[Volume AVG]),SUM('Sample'[Number of days in month]))&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 07:23:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2888462#M93694</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2022-11-07T07:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative and filtered calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2888900#M93718</link>
      <description>&lt;P&gt;Thank you, its working fine.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 09:56:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2888900#M93718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-07T09:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative and filtered calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2892192#M93913</link>
      <description>&lt;P&gt;Hi wdx223_Daniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the above mentioned solution in the original datamodel, but it is not works there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the dataset is more then 7 mn rows.&lt;/P&gt;&lt;P&gt;There is a volume column, where we can find eop and avg figures also, and there is a flag, where we can choose the eop and avg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i make a matrix, and i drop there the volume avg figures, and the number of days, and i make the multiplication and the division, then i get the correct figures.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the above mentioned DAX provides back incorrect figures.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you any idea for this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 12:35:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-and-filtered-calculation/m-p/2892192#M93913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-08T12:35:27Z</dc:date>
    </item>
  </channel>
</rss>

