<?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: Prediction Line in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3313857#M123941</link>
    <description>&lt;P&gt;Hey&lt;BR /&gt;Unfortunately this is not an option as I don't see it.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jul 2023 08:13:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-04T08:13:47Z</dc:date>
    <item>
      <title>Prediction Line</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3306028#M123472</link>
      <description>&lt;P&gt;I need to create a prediction line for how the progress bar should look like.&lt;BR /&gt;(I am using a line and stacked column chart)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In my data table I have begin dates and end dates. I need a measure to choose the earliest and latest dates and create a linear line between it.&lt;BR /&gt;The yellow line is a new column, but it gives back the correct line in overall view. But as I use slicer or filter it doesn't change (as expected). Here is the code for it:&lt;BR /&gt;Regression =&lt;BR /&gt;VAR mind = MIN(Data_Table[Begin Date])&lt;BR /&gt;VAR maxd = MAX(Data_Table[End Date])&lt;BR /&gt;VAR dat = 'Calendar'[Date]&lt;BR /&gt;VAR dated = DATEDIFF(mind,maxd,DAY)&lt;BR /&gt;VAR todated = DATEDIFF(dat,maxd,DAY)&lt;BR /&gt;VAR fromdated = DATEDIFF(mind,dat,DAY)&lt;BR /&gt;RETURN IF(AND(fromdated&amp;gt;=0,todated&amp;gt;=0),(DIVIDE(todated,dated)-1)*(-1),IF(fromdated&amp;lt;0,0,1))&lt;BR /&gt;&lt;BR /&gt;After this I tried to create the measure for it, but it doesn't work like it.&lt;BR /&gt;Here is the code:&lt;BR /&gt;Regression 2 =&lt;BR /&gt;VAR mind = MIN(Data_Table[Begin Date])&lt;BR /&gt;VAR maxd = MAX(Data_Table[End Date])&lt;BR /&gt;VAR dat = SELECTEDVALUE('Calendar'[Date])&lt;BR /&gt;VAR dated = DATEDIFF(mind,maxd,DAY)&lt;BR /&gt;VAR todated = DATEDIFF(dat,maxd,DAY)&lt;BR /&gt;VAR fromdated = DATEDIFF(mind,dat,DAY)&lt;BR /&gt;RETURN IF(AND(fromdated&amp;gt;=0,todated&amp;gt;=0),(DIVIDE(todated,dated)-1)*(-1),IF(fromdated&amp;lt;0,0,IF(todated&amp;lt;0,1,0)))&lt;BR /&gt;&lt;BR /&gt;I don't mind the spikes on the dates where there is no date (missing column), but the slope start later and before that the value is 1 rather 0.&lt;BR /&gt;&lt;BR /&gt;Any help with other approaches as well is much appricated it and have a lovely day.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 12:24:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3306028#M123472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-06-28T12:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Prediction Line</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3307820#M123555</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;did you try forecasting feature in Power BI&lt;/P&gt;&lt;P&gt;Check link&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane" target="_self"&gt;https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Accept it as the solution&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 08:33:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3307820#M123555</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-06-29T08:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Prediction Line</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3313857#M123941</link>
      <description>&lt;P&gt;Hey&lt;BR /&gt;Unfortunately this is not an option as I don't see it.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 08:13:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3313857#M123941</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-04T08:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Prediction Line</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3313947#M123946</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;please check that you have the latest version of Power BI. For forecast feature please note&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The forecasting feature is only available for line chart visuals.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 08:41:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prediction-Line/m-p/3313947#M123946</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-07-04T08:41:50Z</dc:date>
    </item>
  </channel>
</rss>

