<?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 Measure to get plan for every day in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3021670#M102852</link>
    <description>&lt;P&gt;My goal is create a measure that gets a plan value for every dayfrom my calendar.&lt;/P&gt;&lt;P&gt;I have 2 tables - calendar and plans, then I create relationship on columns Date -&amp;gt; Plan from date. But when I try to create a "Visual I want" showing on my screenshot, I get what I get (4th table).&lt;/P&gt;&lt;P&gt;I tried to use option Show items with no data and create my own measure but I was failed to get a correct result. Your help is very appreciated.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;</description>
    <pubDate>Sun, 15 Jan 2023 21:32:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-15T21:32:59Z</dc:date>
    <item>
      <title>Measure to get plan for every day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3021670#M102852</link>
      <description>&lt;P&gt;My goal is create a measure that gets a plan value for every dayfrom my calendar.&lt;/P&gt;&lt;P&gt;I have 2 tables - calendar and plans, then I create relationship on columns Date -&amp;gt; Plan from date. But when I try to create a "Visual I want" showing on my screenshot, I get what I get (4th table).&lt;/P&gt;&lt;P&gt;I tried to use option Show items with no data and create my own measure but I was failed to get a correct result. Your help is very appreciated.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;</description>
      <pubDate>Sun, 15 Jan 2023 21:32:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3021670#M102852</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-15T21:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to get plan for every day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3021707#M102856</link>
      <description>&lt;P&gt;Hello Anonymous&lt;/LI-USER&gt;&amp;nbsp;this is easily solved in power query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Go to transform data, select your table&lt;/P&gt;&lt;P&gt;Add a new column with the below formula&lt;/P&gt;&lt;P&gt;{Number.From([plan from date])..Number.From([plan to date])}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then on the new column expand to new rows and change type to date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you dont have a "until date" column then just add an index column then add a new column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Type in :&amp;nbsp;&lt;SPAN&gt;Try [plan from date] {[Index] + 1} otherwise null&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then just create a new column again&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{Number.From([plan from date])..Number.From(Date.AddDays([new column],-1))}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2023 22:24:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3021707#M102856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-15T22:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to get plan for every day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3022349#M102898</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;SPAN&gt;eliasayy, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have date 9999-12-31 for active plans and a lot of products that have it plan target (I just did not mention it in my example for simplicity) and some plans started from 2017 year. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have around 100к rows in my PlansTable now and if I create additional rows for every day it will crete me a huge table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any chans to do that with a measure only?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 06:36:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3022349#M102898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-16T06:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to get plan for every day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3022504#M102908</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may write a measure like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;measure = 
VAR _date = SELECTEDVALUE(CalendarTable[Date]) 
RETURN
MINX(
    FILTER(
        ALL(PlansTable),
        PlansTable[Plan from date]&amp;lt;=_date
            &amp;amp;&amp;amp;PlansTable[Plan to date]&amp;gt;=_date
    ),
    PlansTable[Value]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it worked like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 08:01:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-to-get-plan-for-every-day/m-p/3022504#M102908</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-16T08:01:03Z</dc:date>
    </item>
  </channel>
</rss>

