<?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 Tabular Editor 2 - Setting DataType of a new measure in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-2-Setting-DataType-of-a-new-measure/m-p/4097861#M54748</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;When creating a new measure, I would also like to set the DataType for the measure, however when trying the below script, I receive an error telling me that "Property or indexer 'Measure.DataType' cannot be assigned to -- it is read only.&lt;BR /&gt;&lt;BR /&gt;Is there a way to set data types with Tabular Editor 2??&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;//Creates default hex colour measures&lt;/P&gt;&lt;P&gt;var measureTable = Model.Tables["Calculations"]; // Gets the table object specified&lt;/P&gt;&lt;P&gt;var newMeasure = measureTable.AddMeasure( // Add new measure to specified measure table&lt;BR /&gt;"Hex Red", // Name&lt;BR /&gt;"#E3A711", // DAX Expression&lt;BR /&gt;"Conditional\\Tabular Editor Test\\" // Puts into Display Folders dynamically&lt;BR /&gt;);&lt;BR /&gt;newMeasure.FormatDax(); // Formats DAX automatically&lt;BR /&gt;newMeasure.IsHidden = true; // Set hidden or visible&lt;BR /&gt;newMeasure.DataType = DataType.String;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Aaron&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2024 14:43:25 GMT</pubDate>
    <dc:creator>Aaron_C</dc:creator>
    <dc:date>2024-08-13T14:43:25Z</dc:date>
    <item>
      <title>Tabular Editor 2 - Setting DataType of a new measure</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-2-Setting-DataType-of-a-new-measure/m-p/4097861#M54748</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;When creating a new measure, I would also like to set the DataType for the measure, however when trying the below script, I receive an error telling me that "Property or indexer 'Measure.DataType' cannot be assigned to -- it is read only.&lt;BR /&gt;&lt;BR /&gt;Is there a way to set data types with Tabular Editor 2??&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;//Creates default hex colour measures&lt;/P&gt;&lt;P&gt;var measureTable = Model.Tables["Calculations"]; // Gets the table object specified&lt;/P&gt;&lt;P&gt;var newMeasure = measureTable.AddMeasure( // Add new measure to specified measure table&lt;BR /&gt;"Hex Red", // Name&lt;BR /&gt;"#E3A711", // DAX Expression&lt;BR /&gt;"Conditional\\Tabular Editor Test\\" // Puts into Display Folders dynamically&lt;BR /&gt;);&lt;BR /&gt;newMeasure.FormatDax(); // Formats DAX automatically&lt;BR /&gt;newMeasure.IsHidden = true; // Set hidden or visible&lt;BR /&gt;newMeasure.DataType = DataType.String;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Aaron&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 14:43:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-2-Setting-DataType-of-a-new-measure/m-p/4097861#M54748</guid>
      <dc:creator>Aaron_C</dc:creator>
      <dc:date>2024-08-13T14:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Tabular Editor 2 - Setting DataType of a new measure</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-2-Setting-DataType-of-a-new-measure/m-p/4099286#M54759</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/672304"&gt;@Aaron_C&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I know,&amp;nbsp;you can use the&amp;nbsp;Properties&amp;nbsp;view to review and edit the value of all properties of the currently selected object(s) such as&amp;nbsp;the&amp;nbsp;Name,&amp;nbsp;Expression&amp;nbsp;and&amp;nbsp;Hidden&amp;nbsp;properties, in the&amp;nbsp;TOM Explorer.&lt;BR /&gt;For measures, this is where you can set the&amp;nbsp;Format String, for example. For more information,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;see&amp;nbsp;&lt;A class="" href="https://docs.tabulareditor.com/te3/views/properties-view.html" target="_blank" rel="noopener"&gt;Properties view&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 05:30:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-2-Setting-DataType-of-a-new-measure/m-p/4099286#M54759</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-14T05:30:58Z</dc:date>
    </item>
  </channel>
</rss>

