<?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: Creating a Date Table with only months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037489#M104037</link>
    <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or you wanna create a table from scratch, like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DateTable = 
ADDCOLUMNS(
    CALENDAR(DATE(2022,12,30), DATE(2023,1,1)),
    "MonthYear", FORMAT([Date], "MMMM YYYY"),
    "MonYear", FORMAT([Date], "MMM YYYY")
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 11:19:13 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-01-23T11:19:13Z</dc:date>
    <item>
      <title>Creating a Date Table with only months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037442#M104035</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to created a date table, where each row is equal to one month, like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;January 2023&lt;/P&gt;&lt;P&gt;February 2022&lt;/P&gt;&lt;P&gt;March 2022&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a number of methods for this but I can't seem to figure it out. For example, CALANDERAUTO() gives me a row for each day, rather than a row for each month as per below:&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;&lt;P&gt;Any help would be greatlly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 11:06:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037442#M104035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-23T11:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Date Table with only months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037466#M104036</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to add a column like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MonthYear = &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"MMMM&lt;/SPAN&gt;&lt;SPAN&gt; YYYY"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Jan 2023 11:13:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037466#M104036</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-23T11:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Date Table with only months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037489#M104037</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or you wanna create a table from scratch, like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DateTable = 
ADDCOLUMNS(
    CALENDAR(DATE(2022,12,30), DATE(2023,1,1)),
    "MonthYear", FORMAT([Date], "MMMM YYYY"),
    "MonYear", FORMAT([Date], "MMM YYYY")
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 11:19:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037489#M104037</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-23T11:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Date Table with only months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037513#M104038</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can create a blank query and paste this code to generate desired results.&lt;/P&gt;&lt;P&gt;Please change the range as per your requirement.&lt;/P&gt;&lt;P&gt;----------------------------------&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ31DcyMDRQio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [StartDate = _t]),&lt;BR /&gt;#"Changed column type" = Table.TransformColumnTypes(Source, {{"StartDate", type date}}),&lt;BR /&gt;#"Added custom" = Table.AddColumn(#"Changed column type", "EndDate", each "12/31/2025"),&lt;BR /&gt;#"Changed column type 1" = Table.TransformColumnTypes(#"Added custom", {{"EndDate", type date}}),&lt;BR /&gt;#"Added custom 1" = Table.AddColumn(#"Changed column type 1", "Date", each {Number.From([StartDate])..Number.From([EndDate])}),&lt;BR /&gt;#"Expanded Date" = Table.ExpandListColumn(#"Added custom 1", "Date"),&lt;BR /&gt;#"Changed column type 2" = Table.TransformColumnTypes(#"Expanded Date", {{"Date", type date}}),&lt;BR /&gt;#"Removed Columns" = Table.RemoveColumns(#"Changed column type 2",{"StartDate", "EndDate"}),&lt;BR /&gt;#"Calculated Start of Month" = Table.TransformColumns(#"Removed Columns",{{"Date", Date.StartOfMonth, type date}}),&lt;BR /&gt;#"Removed Duplicates" = Table.Distinct(#"Calculated Start of Month")&lt;BR /&gt;in&lt;BR /&gt;#"Removed Duplicates"&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 11:24:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3037513#M104038</guid>
      <dc:creator>xh0050515</dc:creator>
      <dc:date>2023-01-23T11:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Date Table with only months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3041944#M104380</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can refer to the following example.&lt;/P&gt;
&lt;P&gt;Create a new table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = var a=ADDCOLUMNS(CALENDAR(DATE(2022,1,1),DATE(2023,1,1)),"Month Year",FORMAT([Date],"yyyy mmmm"))
return SUMMARIZE(a,[Month Year])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then change the data type to date, and the format to "mmmm yyyy"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 07:36:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Date-Table-with-only-months/m-p/3041944#M104380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-25T07:36:44Z</dc:date>
    </item>
  </channel>
</rss>

