<?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: DAX calendar problem in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724985#M145072</link>
    <description>&lt;P&gt;Sorry.&amp;nbsp; You're correct.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 20:16:11 GMT</pubDate>
    <dc:creator>gmsamborn</dc:creator>
    <dc:date>2024-02-26T20:16:11Z</dc:date>
    <item>
      <title>DAX calendar problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3722082#M144953</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I haven't used DAX for a while,&lt;BR /&gt;I came across the &lt;A href="https://mp.weixin.qq.com/s?__biz=MzI2MDY3NDk1OA==&amp;amp;mid=2247488521&amp;amp;idx=1&amp;amp;sn=0b6a1eebd8994d8e3106815f58b0ec77&amp;amp;chksm=ea6750e8dd10d9feebbf984a27de52cb05fe95d79663ada91273ca5570cc54e372c13428d701&amp;amp;scene=178&amp;amp;cur_album_id=2109471850723328002#rd" target="_self"&gt;link&lt;/A&gt; below which I would like to apply personally.&lt;BR /&gt;However, I don't know this language at all and can't create the calendar despite the automatic translation.&lt;BR /&gt;The DAX code I used is the one in the link, but it doesn't work for me in Excel 2019.&lt;BR /&gt;&lt;STRONG&gt;Could you please help me with this 1st code ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;= 
 GENERATE (
 CALENDAR ( DATE ( 2020; 1; 1 ); DATE ( 2022; 12; 31 ) );
 VAR currentDay = [Date]
 VAR year = YEAR ( currentDay )
 VAR month = FORMAT ( currentDay; "MM" )
 RETURN ROW (
 "Calendar", year&amp;amp;month
 )
 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ID	Start	End	Capital	Depreciation
1001	01/01/2021	31/12/2021	30 000,00	2 500,00
1002	29/01/2021	29/01/2022	20 000,00	1 666,67
1003	01/12/2020	30/11/2021	150 000,00	12 500,00
1004	28/04/2021	27/04/2022	98 000,00	8 166,67&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 17:01:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3722082#M144953</guid>
      <dc:creator>Mederic</dc:creator>
      <dc:date>2024-02-25T17:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX calendar problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3722239#M144966</link>
      <description>&lt;P&gt;You can simplify it like this:&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;= 
 ADDCOLUMNS (
 CALENDAR ( "2020-01-01" ;  "2022-12-31"  );
  "Calendar", FORMAT([Date]; "yyyyMM")
 )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 20:29:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3722239#M144966</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-25T20:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX calendar problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724936#M145067</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your message,&lt;BR /&gt;Unfortunately, it didn't work for this example,&lt;BR /&gt;I don't know whether the DAX formula instruction in the link is intended to create a new table of dates or to add a new column to the existing table.&lt;img /&gt;&lt;BR /&gt;I can't get the DAX formulas to work.&lt;BR /&gt;Maybe I'm doing it wrong!&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 19:38:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724936#M145067</guid>
      <dc:creator>Mederic</dc:creator>
      <dc:date>2024-02-26T19:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: DAX calendar problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724948#M145068</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="524456" data-lia-user-login="Mederic" class="lia-mention lia-mention-user"&gt;Mederic&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know anything about Power Query in Excel but it appears that you are trying to create a table in the window meant for creating a measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish I could help more but I'm unsure of how to create a table.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 19:52:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724948#M145068</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2024-02-26T19:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: DAX calendar problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724962#M145069</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="426215" data-lia-user-login="gmsamborn" class="lia-mention lia-mention-user"&gt;gmsamborn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the information,&lt;BR /&gt;I also thought that the subject of the link was to create a new table,&lt;BR /&gt;Otherwise, I think you meant to say Dax instead of Power query&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 20:06:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724962#M145069</guid>
      <dc:creator>Mederic</dc:creator>
      <dc:date>2024-02-26T20:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: DAX calendar problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724977#M145071</link>
      <description>&lt;P&gt;What I haven't figured out yet is how to create a table in Excel that would then accept a DAX query.&amp;nbsp; I know you can bend the query of tables that are tied to existing connections, but I think you want to do this from scratch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="426215" data-lia-user-login="gmsamborn" class="lia-mention lia-mention-user"&gt;gmsamborn&lt;/a&gt;&amp;nbsp;good observation about the measure thing.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 20:14:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724977#M145071</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-26T20:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: DAX calendar problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724985#M145072</link>
      <description>&lt;P&gt;Sorry.&amp;nbsp; You're correct.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 20:16:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3724985#M145072</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2024-02-26T20:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: DAX calendar problem</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3725080#M145079</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="426215" data-lia-user-login="gmsamborn" class="lia-mention lia-mention-user"&gt;gmsamborn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I think I understand the problem better,&lt;BR /&gt;Excel and Power BI don't work the same way for creating tables.&lt;/P&gt;&lt;P&gt;Indeed lbendlin&amp;nbsp;, you are right, we must to do this from scratch in Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the code from lbendlin in Power BI&amp;nbsp;and it works very well (see&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The one in the link, which is more complex, gives the same result (see Table2)&lt;BR /&gt;I'll see how I can create a new table in Excel&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 21:13:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-calendar-problem/m-p/3725080#M145079</guid>
      <dc:creator>Mederic</dc:creator>
      <dc:date>2024-02-26T21:13:32Z</dc:date>
    </item>
  </channel>
</rss>

