<?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: Spread projectvalue across now and project_end_date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-projectvalue-across-now-and-project-end-date/m-p/2983071#M100042</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="489536" data-lia-user-login="Mister_PowerBI" class="lia-mention lia-mention-user"&gt;Mister_PowerBI&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Week = WEEKNUM('Table'[end_date ],2)&lt;/LI-CODE&gt;
&lt;P&gt;2. Enter data – create &amp;nbsp;a table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _select=SELECTEDVALUE('Slicer_Table'[Slicer])
var _today=TODAY()
var _minweekdate=
MINX(FILTER(ALL('Table'),YEAR('Table'[end_date ])=YEAR(MAX('Table'[end_date ]))&amp;amp;&amp;amp;'Table'[Week]=
MINX(FILTER(ALL('Table'),'Table'[end_date ]=_today),[Week])),[end_date ])
return
SWITCH(
    TRUE(),
    MAX('Slicer_Table'[Slicer])="Month"&amp;amp;&amp;amp;MAX('Table'[end_date ])&amp;gt;=DATE(YEAR(_today),MONTH(_today),1)&amp;amp;&amp;amp;MAX('Table'[end_date ])&amp;lt;=_today,1,
    MAX('Slicer_Table'[Slicer])="Week"&amp;amp;&amp;amp;MAX('Table'[end_date ])&amp;gt;=_minweekdate&amp;amp;&amp;amp;MAX('Table'[end_date ])&amp;lt;=_today,1,
    0)&lt;/LI-CODE&gt;
&lt;P&gt;4. Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;5. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2022 01:51:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-12-22T01:51:06Z</dc:date>
    <item>
      <title>Spread projectvalue across now and project_end_date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-projectvalue-across-now-and-project-end-date/m-p/2980875#M99923</link>
      <description>&lt;P&gt;Hello everybody,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a hard time getting this figured out and was hoping maybe somebody can help me out .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say I have a database with project&lt;U&gt;s&lt;/U&gt; that have an&amp;nbsp;&lt;STRONG&gt;end_date&lt;/STRONG&gt; and a&amp;nbsp;&lt;STRONG&gt;remaining_project_value&lt;/STRONG&gt; column. I would like to spread the&amp;nbsp;&lt;STRONG&gt;remeaning_project_value&lt;/STRONG&gt; over the dates between &lt;STRONG&gt;UTCNOW()&lt;/STRONG&gt; and &lt;STRONG&gt;end_date&amp;nbsp;&lt;/STRONG&gt;and show this in an interactive visual that can be switched. So the visual needs to be able to switch from week to month, and show the &lt;STRONG&gt;remaining_project_value&lt;/STRONG&gt; accordingly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody put me in the right direction?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 07:05:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-projectvalue-across-now-and-project-end-date/m-p/2980875#M99923</guid>
      <dc:creator>Mister_PowerBI</dc:creator>
      <dc:date>2022-12-21T07:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Spread projectvalue across now and project_end_date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-projectvalue-across-now-and-project-end-date/m-p/2983071#M100042</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="489536" data-lia-user-login="Mister_PowerBI" class="lia-mention lia-mention-user"&gt;Mister_PowerBI&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Week = WEEKNUM('Table'[end_date ],2)&lt;/LI-CODE&gt;
&lt;P&gt;2. Enter data – create &amp;nbsp;a table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _select=SELECTEDVALUE('Slicer_Table'[Slicer])
var _today=TODAY()
var _minweekdate=
MINX(FILTER(ALL('Table'),YEAR('Table'[end_date ])=YEAR(MAX('Table'[end_date ]))&amp;amp;&amp;amp;'Table'[Week]=
MINX(FILTER(ALL('Table'),'Table'[end_date ]=_today),[Week])),[end_date ])
return
SWITCH(
    TRUE(),
    MAX('Slicer_Table'[Slicer])="Month"&amp;amp;&amp;amp;MAX('Table'[end_date ])&amp;gt;=DATE(YEAR(_today),MONTH(_today),1)&amp;amp;&amp;amp;MAX('Table'[end_date ])&amp;lt;=_today,1,
    MAX('Slicer_Table'[Slicer])="Week"&amp;amp;&amp;amp;MAX('Table'[end_date ])&amp;gt;=_minweekdate&amp;amp;&amp;amp;MAX('Table'[end_date ])&amp;lt;=_today,1,
    0)&lt;/LI-CODE&gt;
&lt;P&gt;4. Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;5. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 01:51:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-projectvalue-across-now-and-project-end-date/m-p/2983071#M100042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-22T01:51:06Z</dc:date>
    </item>
  </channel>
</rss>

