<?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: Default values for data before first available date in fact table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247933#M168182</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;try to plot with a measure like below instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
IF(
    SUM([Total Sales]) = BLANK(),
    100
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2024 08:35:34 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2024-10-18T08:35:34Z</dc:date>
    <item>
      <title>Default values for data before first available date in fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247894#M168179</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a small chalenge with past dates and values.&lt;/P&gt;&lt;P&gt;In my facts table first sales values start in January 2024. I have actual sales data from Jan till Dec 2024.&lt;/P&gt;&lt;P&gt;In my calendar table and on visuals I will be also displaying data for 2023 although no actuals sales occured in this period and data in facts table is not available.&lt;/P&gt;&lt;P&gt;Is there a way for me to populate with DAX all dates in the past before first sales occured&amp;nbsp; (&amp;lt;Jan 2024) as a default 100 for example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 08:09:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247894#M168179</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-18T08:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Default values for data before first available date in fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247933#M168182</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;try to plot with a measure like below instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
IF(
    SUM([Total Sales]) = BLANK(),
    100
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 08:35:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247933#M168182</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-10-18T08:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Default values for data before first available date in fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247957#M168185</link>
      <description>&lt;P&gt;hello, thanks for you reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My case is more complex so I would like to define in DAX a rule related to the dates in the past before sales occured (maybe something with max/min dates) because I need to apply a different rule for blanks in the future. That's why I need to distinguish those 2 cases and I cannot just put blanks everywhere. I need DAX to be more specific to the dates in the past. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 08:42:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247957#M168185</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-18T08:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Default values for data before first available date in fact table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247985#M168186</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;try this and what is attached:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _maxsalesdate  = MAXX(ALLSELECTED(data), data[Date])
VAR _minsalesdate  = MINX(ALLSELECTED(data), data[Date])
VAR _currentdate = MAX(dates[Date])
VAR _result = 
SWITCH(
    TRUE(),
    _minsalesdate&amp;gt;_currentdate, 100,
    _maxsalesdate&amp;lt;_currentdate, 1000,
    SUM(data[Sales])
)
RETURN _result&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 09:00:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Default-values-for-data-before-first-available-date-in-fact/m-p/4247985#M168186</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-10-18T09:00:50Z</dc:date>
    </item>
  </channel>
</rss>

