<?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: DateAdd Alternative for Function retrieving a Date, and Making a new Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2771074#M86278</link>
    <description>&lt;P&gt;If I dont have a table with the column, can I use a relationship between the table with the dateadd to have just a date column in the table I am visualizing? Because the date doesnt exist anywhere, thats why I am using DateAdd. I am alternatively trying to make the Date in the server vs in PowerBi&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 16:14:20 GMT</pubDate>
    <dc:creator>NL-Nicolas</dc:creator>
    <dc:date>2022-09-15T16:14:20Z</dc:date>
    <item>
      <title>DateAdd Alternative for Function retrieving a Date, and Making a new Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2753230#M84996</link>
      <description>&lt;P&gt;Hey Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting an error from my calculated column when I try to filter it due to using DateAdd, how can I resolve this?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Column in Questions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Week LY = CALCULATE(&lt;BR /&gt;Sum(DayfileSummary[NetSales]),&lt;BR /&gt;DATEADD(DayfileSummary[DF_BusinessDay],-1,YEAR))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Feedback Type:&lt;/STRONG&gt;&lt;BR /&gt;Frown (Error)&lt;/P&gt;&lt;P&gt;Timestamp:&lt;BR /&gt;2022-09-07T13:21:26.7914320Z&lt;/P&gt;&lt;P&gt;Local Time:&lt;BR /&gt;2022-09-07T07:21:26.7914320-06:00&lt;/P&gt;&lt;P&gt;Session ID:&lt;BR /&gt;ddb48463-8f74-4fbf-9f1e-03d7e0d1b5ed&lt;/P&gt;&lt;P&gt;Release:&lt;BR /&gt;April 2022&lt;/P&gt;&lt;P&gt;Product Version:&lt;BR /&gt;2.104.941.0 (22.04) (x86)&lt;/P&gt;&lt;P&gt;Error Message:&lt;BR /&gt;MdxScript(Model) (6, 21) Calculation error in measure 'DayfileSummary'[Week LY]: Function 'DATEADD' expects a contiguous selection when the date column is not unique, has gaps or it contains time portion.&lt;/P&gt;&lt;P&gt;OS Version:&lt;BR /&gt;Microsoft Windows NT 10.0.17763.0 (x64 en-US)&lt;/P&gt;&lt;P&gt;CLR Version:&lt;BR /&gt;4.7 or later [Release Number = 528049]&lt;/P&gt;&lt;P&gt;Peak Virtual Memory:&lt;BR /&gt;1.71 GB&lt;/P&gt;&lt;P&gt;Private Memory:&lt;BR /&gt;459 MB&lt;/P&gt;&lt;P&gt;Peak Working Set:&lt;BR /&gt;689 MB&lt;/P&gt;&lt;P&gt;IE Version:&lt;BR /&gt;11.1790.17763.0&lt;/P&gt;&lt;P&gt;User ID:&lt;BR /&gt;25db3681-a0a4-4acc-8351-11cdf00e505d&lt;/P&gt;&lt;P&gt;Workbook Package Info:&lt;BR /&gt;1* - en-US, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.&lt;/P&gt;&lt;P&gt;Telemetry Enabled:&lt;BR /&gt;True&lt;/P&gt;&lt;P&gt;Snapshot Trace Logs:&lt;BR /&gt;C:\Users\administrator.PDCORP\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShote7f92045-e52e-4e33-9707-66437e26a6de.zip&lt;/P&gt;&lt;P&gt;Model Default Mode:&lt;BR /&gt;Import&lt;/P&gt;&lt;P&gt;Model Version:&lt;BR /&gt;PowerBI_V3&lt;/P&gt;&lt;P&gt;Performance Trace Logs:&lt;BR /&gt;C:\Users\administrator.PDCORP\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip&lt;/P&gt;&lt;P&gt;Enabled Preview Features:&lt;BR /&gt;PBI_enableWebView2&lt;BR /&gt;PBI_mobileAuthoringFormattingUI&lt;BR /&gt;PBI_useModernFormatPane&lt;BR /&gt;PBI_sparklines&lt;/P&gt;&lt;P&gt;Disabled Preview Features:&lt;BR /&gt;PBI_shapeMapVisualEnabled&lt;BR /&gt;PBI_SpanishLinguisticsEnabled&lt;BR /&gt;PBI_qnaLiveConnect&lt;BR /&gt;PBI_azureMapVisual&lt;BR /&gt;PBI_dataPointLassoSelect&lt;BR /&gt;PBI_compositeModelsOverAS&lt;BR /&gt;PBI_enhancedTooltips&lt;BR /&gt;PQ_WebView2Connector&lt;BR /&gt;PBI_scorecardVisual&lt;BR /&gt;PBI_lineChartError&lt;/P&gt;&lt;P&gt;Disabled DirectQuery Options:&lt;BR /&gt;TreatHanaAsRelationalSource&lt;/P&gt;&lt;P&gt;Cloud:&lt;BR /&gt;GlobalCloud&lt;/P&gt;&lt;P&gt;DPI Scale:&lt;BR /&gt;100%&lt;/P&gt;&lt;P&gt;Supported Services:&lt;BR /&gt;Power BI&lt;/P&gt;&lt;P&gt;Formulas:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;section Section1;&lt;/P&gt;&lt;P&gt;shared DayfileSummary = let&lt;BR /&gt;Source = Sql.Databases("pdc-pos1\speedlink"),&lt;BR /&gt;SpeedlinkDB = Source{[Name="SpeedlinkDB"]}[Data],&lt;BR /&gt;dbo_DayfileSummary = SpeedlinkDB{[Schema="dbo",Item="DayfileSummary"]}[Data]&lt;BR /&gt;in&lt;BR /&gt;dbo_DayfileSummary;&lt;/P&gt;&lt;P&gt;shared ItemSummary = let&lt;BR /&gt;Source = Sql.Databases("pdc-pos1\speedlink"),&lt;BR /&gt;SpeedlinkDB = Source{[Name="SpeedlinkDB"]}[Data],&lt;BR /&gt;dbo_ItemSummary = SpeedlinkDB{[Schema="dbo",Item="ItemSummary"]}[Data]&lt;BR /&gt;in&lt;BR /&gt;dbo_ItemSummary;&lt;/P&gt;&lt;P&gt;shared Payments = let&lt;BR /&gt;Source = Sql.Databases("pdc-pos1\speedlink"),&lt;BR /&gt;SpeedlinkDB = Source{[Name="SpeedlinkDB"]}[Data],&lt;BR /&gt;dbo_Payments = SpeedlinkDB{[Schema="dbo",Item="Payments"]}[Data]&lt;BR /&gt;in&lt;BR /&gt;dbo_Payments;&lt;/P&gt;&lt;P&gt;shared AccountDetail = let&lt;BR /&gt;Source = Sql.Databases("pdc-pos1\speedlink"),&lt;BR /&gt;SpeedlinkDB = Source{[Name="SpeedlinkDB"]}[Data],&lt;BR /&gt;dbo_AccountDetail = SpeedlinkDB{[Schema="dbo",Item="AccountDetail"]}[Data],&lt;BR /&gt;#"Removed Columns" = Table.RemoveColumns(dbo_AccountDetail,{"TicketSeq", "SessionID", "TicketID", "ReverseTransID", "ForeignAmount", "TransType", "TransData", "GroupingTransID", "TenderGroupName"})&lt;BR /&gt;in&lt;BR /&gt;#"Removed Columns";&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 13:24:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2753230#M84996</guid>
      <dc:creator>NL-Nicolas</dc:creator>
      <dc:date>2022-09-07T13:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Alternative for Function retrieving a Date, and Making a new Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2753603#M85023</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="410549" data-lia-user-login="NL-Nicolas" class="lia-mention lia-mention-user"&gt;NL-Nicolas&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is the&amp;nbsp;&lt;SPAN&gt;DayfileSummary[DF_BusinessDay] formatted as a date or a date/time?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If date/time, try changing the data type to a date in Power Query then try the calculation again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 16:24:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2753603#M85023</guid>
      <dc:creator>Adescrit</dc:creator>
      <dc:date>2022-09-07T16:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Alternative for Function retrieving a Date, and Making a new Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2754061#M85063</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="410549" data-lia-user-login="NL-Nicolas" class="lia-mention lia-mention-user"&gt;NL-Nicolas&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This issue is caused by the first parameter in your DATEADD function. According to the syntax of DATEADD, you must provide a column that contains dates. And the dates argument can be any of the following:&lt;/P&gt;
&lt;P&gt;1 A reference to a date/time column,&lt;/P&gt;
&lt;P&gt;2 A table expression that returns a single column of date/time values,&lt;/P&gt;
&lt;P&gt;3 A Boolean expression that defines a single-column table of date/time values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details about the usage of DATEADD, please have a look at &lt;A href="https://docs.microsoft.com/en-us/dax/dateadd-function-dax" target="_blank"&gt;DATEADD function (DAX) - DAX | Microsoft Docs&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To solve this problem, you need make sure the first parameter is a date/time column by changing its date type or replace it with a date column from a Date/Calendar table. Here is a similar that may help you: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/DATEADD-quot-expects-a-contiguous-selection-when-the-date-column/m-p/699964" target="_blank"&gt;Solved: DATEADD "expects a contiguous selection when the d... - Microsoft Power BI Community&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post helps, then please consider&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 01:40:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2754061#M85063</guid>
      <dc:creator>v-cazheng-msft</dc:creator>
      <dc:date>2022-09-08T01:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Alternative for Function retrieving a Date, and Making a new Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2758635#M85413</link>
      <description>&lt;P&gt;So it is formatted as a date and time, the DateADD function is the issue in question but it is needed to get the projected week &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 15:17:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2758635#M85413</guid>
      <dc:creator>NL-Nicolas</dc:creator>
      <dc:date>2022-09-09T15:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Alternative for Function retrieving a Date, and Making a new Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2758636#M85414</link>
      <description>&lt;P&gt;Giving the suggested form a read now, thank you so much for the help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 15:17:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2758636#M85414</guid>
      <dc:creator>NL-Nicolas</dc:creator>
      <dc:date>2022-09-09T15:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Alternative for Function retrieving a Date, and Making a new Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2771074#M86278</link>
      <description>&lt;P&gt;If I dont have a table with the column, can I use a relationship between the table with the dateadd to have just a date column in the table I am visualizing? Because the date doesnt exist anywhere, thats why I am using DateAdd. I am alternatively trying to make the Date in the server vs in PowerBi&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 16:14:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Alternative-for-Function-retrieving-a-Date-and-Making-a/m-p/2771074#M86278</guid>
      <dc:creator>NL-Nicolas</dc:creator>
      <dc:date>2022-09-15T16:14:20Z</dc:date>
    </item>
  </channel>
</rss>

