<?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: Forecast the cost for rest of the days/month based on todays cost in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3942358#M153264</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting syntax error as&amp;nbsp; it is not able to find the month and store in the variable . The date column is not visible while defining the variable.&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2024 08:05:40 GMT</pubDate>
    <dc:creator>Mohivaj</dc:creator>
    <dc:date>2024-05-23T08:05:40Z</dc:date>
    <item>
      <title>Forecast the cost for rest of the days/month based on todays cost</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3936429#M153094</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement&amp;nbsp; to forecast the cost for the next day/month based on todays cost.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 23:21:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3936429#M153094</guid>
      <dc:creator>Mohivaj</dc:creator>
      <dc:date>2024-05-21T23:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast the cost for rest of the days/month based on todays cost</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3936446#M153095</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/19/2024&lt;/TD&gt;&lt;TD&gt;31000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/20/2024&lt;/TD&gt;&lt;TD&gt;32000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/21/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/22/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/23/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/24/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/25/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/26/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/27/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/28/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/29/2024&lt;/TD&gt;&lt;TD&gt;&amp;nbs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gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 15:18:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3936446#M153095</guid>
      <dc:creator>Mohivaj</dc:creator>
      <dc:date>2024-05-21T15:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast the cost for rest of the days/month based on todays cost</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3937935#M153143</link>
      <description>&lt;P&gt;Hi,&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692615" data-lia-user-login="Mohivaj" class="lia-mention lia-mention-user"&gt;Mohivaj&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for sharing your question with us. &lt;BR /&gt;I have carefully studied the information you have provided, but I must be honest and tell you that I do not understand some parts deeply enough, especially the logic of prediction as you would like it to be. Could you please provide a more detailed explanation or relevant examples?&lt;/P&gt;
&lt;P&gt;Regarding the issue you raised, my solution is as follows:&lt;BR /&gt;My forecasting logic is to take the values that are known now and return them to the next day of the month on the same date for cost forecasting.&lt;/P&gt;
&lt;P&gt;1. Below are the Calculated Columns I've created for your needs:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fore = 
VAR cm=MONTH('foresee table'[Date])
VAR cd=DAY('foresee table'[Date])
var nextm=CALCULATE(MAX('foresee table'[Cost]),FILTER('foresee table',DAY('foresee table'[Date])=cd-1))
RETURN nextm

&lt;/LI-CODE&gt;
&lt;P&gt;2.Here's my final result, which I hope meets your requirements.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I look forward to hearing from you and thank you for your understanding and support.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Leroy Lu&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider Accept it &lt;STRONG&gt;&lt;EM&gt;as the solution &lt;/EM&gt;&lt;/STRONG&gt;to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 05:19:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3937935#M153143</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-22T05:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast the cost for rest of the days/month based on todays cost</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3942358#M153264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting syntax error as&amp;nbsp; it is not able to find the month and store in the variable . The date column is not visible while defining the variable.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 08:05:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3942358#M153264</guid>
      <dc:creator>Mohivaj</dc:creator>
      <dc:date>2024-05-23T08:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast the cost for rest of the days/month based on todays cost</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3960409#M153675</link>
      <description>&lt;P&gt;Hi,&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692615" data-lia-user-login="Mohivaj" class="lia-mention lia-mention-user"&gt;Mohivaj&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your response.&lt;/P&gt;
&lt;P&gt;Could you give us more details?&lt;/P&gt;
&lt;P&gt;Are you using measure or calculation columns? The code I provided before is calculated column, the following is my updated calculation column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fore = 
VAR cd=DAY('foresee table'[Date])
var nextm=CALCULATE(MAX('foresee table'[Cost]),FILTER('foresee table',DAY('foresee table'[Date])=cd-1))
RETURN nextm&lt;/LI-CODE&gt;
&lt;P&gt;If there is a problem with your metric or calculation column, please provide your requirements and your code.&lt;BR /&gt;Here is the relevant documentation:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tutorial-create-calculated-columns" target="_blank"&gt;Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tutorial-create-measures" target="_blank"&gt;Tutorial: Create your own measures in Power BI Desktop - Power BI | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;Please find the attached pbix relevant to the case.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Leroy Lu&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 09:08:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-the-cost-for-rest-of-the-days-month-based-on-todays/m-p/3960409#M153675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-30T09:08:57Z</dc:date>
    </item>
  </channel>
</rss>

