<?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: Tabular Editor Script - Time Intelligence - Financial YTD in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-Script-Time-Intelligence-Financial-YTD/m-p/3698146#M49528</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/281849"&gt;@AndySmith&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the related document, you can view this content:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/learn-how-to-calculate-sales-financial-year-to-date/" target="_blank"&gt;blog.enterprisedna.co&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/DAX-Formulas-for-Fiscal-Year-Fiscal-Quarter-and-Month-Short-Name/m-p/18268" aria-label="Link DAX Formulas for Fiscal Year, Fiscal Quarter and M... - Microsoft Fabric Community" target="_blank"&gt;DAX Formulas for Fiscal Year, Fiscal Quarter and M... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 07:03:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-14T07:03:49Z</dc:date>
    <item>
      <title>Tabular Editor Script - Time Intelligence - Financial YTD</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-Script-Time-Intelligence-Financial-YTD/m-p/3697486#M49522</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi - I have the below very useful code taken from Havens consulting. Was wondering if anyone had used this but with a financial YTD instead of calendar YTD? Our FY ends in June.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;/*
 * Generate time intelligence measures based
 *
 * Modified by: Reid Havens, https://havensconsulting.net 
 * Original Author(s): Benoit Fedit, https://datakuity.com 
 * Original Author(s): Bernat Agulló, www.esbrina-ba.com/blog 
 *
 */

// Creates popup promots to select the calendar table, and date column, to then dynamically update the scripts below
var CalendarTable = SelectTable(label: "Select your calendar table");
if(CalendarTable == null) return;

var CalendarTableDateColumn = SelectColumn(CalendarTable.Columns, label: "Select the date key column");
if(CalendarTableDateColumn == null) return;
string CalendarTableName = CalendarTable.Name;
string CalendarTableDateColumnName = CalendarTableDateColumn.Name;

// For each selected measure create YTY, PY, PY YTD, YOY, YOY% measures
foreach(var m in Selected.Measures) {
    
    // YTD
    m.Table.AddMeasure(
    m.Name + " YTD",                                       // Name
    "\r\n" +                                               // Carriage Return
    "CALCULATE(" + 
    "\r\n" +                                               // Carriage Return
    "   " + m.DaxObjectName + "," +
    "\r\n" +                                               // Carriage Return
    "   DATESYTD( '" + CalendarTableName + "'[" + CalendarTableDateColumnName + "] )" +
    "\r\n" +                                               // Carriage Return
    ")",
    ".Time Intelligence\\" +  m.Name     // Display Folder
    );
    &lt;/LI-CODE&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 00:07:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-Script-Time-Intelligence-Financial-YTD/m-p/3697486#M49522</guid>
      <dc:creator>AndySmith</dc:creator>
      <dc:date>2024-02-14T00:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Tabular Editor Script - Time Intelligence - Financial YTD</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-Script-Time-Intelligence-Financial-YTD/m-p/3698146#M49528</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/281849"&gt;@AndySmith&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the related document, you can view this content:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/learn-how-to-calculate-sales-financial-year-to-date/" target="_blank"&gt;blog.enterprisedna.co&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/DAX-Formulas-for-Fiscal-Year-Fiscal-Quarter-and-Month-Short-Name/m-p/18268" aria-label="Link DAX Formulas for Fiscal Year, Fiscal Quarter and M... - Microsoft Fabric Community" target="_blank"&gt;DAX Formulas for Fiscal Year, Fiscal Quarter and M... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 07:03:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-Script-Time-Intelligence-Financial-YTD/m-p/3698146#M49528</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-14T07:03:49Z</dc:date>
    </item>
  </channel>
</rss>

