<?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: REST API PushDataSet Date Table Measures in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-PushDataSet-Date-Table-Measures/m-p/974478#M22694</link>
    <description>&lt;P&gt;You could check the Issues forum here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Issues/idb-p/Issues" target="_blank"&gt;https://community.powerbi.com/t5/Issues/idb-p/Issues&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And if it is not there, then you could post it.&lt;BR /&gt;&lt;BR /&gt;If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to &lt;A href="https://support.powerbi.com" target="_blank"&gt;https://support.powerbi.com&lt;/A&gt;. Scroll down and click "CREATE SUPPORT TICKET".&lt;/P&gt;</description>
    <pubDate>Sat, 14 Mar 2020 18:23:17 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2020-03-14T18:23:17Z</dc:date>
    <item>
      <title>REST API PushDataSet Date Table Measures</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-PushDataSet-Date-Table-Measures/m-p/974471#M22693</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working thru using PushDatasets for an Embedded solution. It looks promising.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I am really struggling with Measures, and in particular building a Date table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the guts of the problematic code, resulting in an "InternalServerError" after a lengthy time. I have tried all sorts of variants, some resulting in BadRequest, and others in the InternalServer error. I dont seem to be able to find any concrete examples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;// Columns...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;var datecolList = new List&amp;lt;Column&amp;gt;();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;datecolList.Add(new Column("Date", "datetime"));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;datecolList.Add(new Column("Year", "string"));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;datecolList.Add(new Column("Quarter", "string"));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;datecolList.Add(new Column("Month", "string"));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;// Date measure...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;var dateMeasureList = new List&amp;lt;Measure&amp;gt;();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Measure meas1 = new Measure();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;meas1.Name = "Date";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;meas1.Expression = "Date = CALENDARAUTO()";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;dateMeasureList.Add(meas1);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;// OK - This expression is breaking the dataset creation. Commented out....&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Measure meas2 = new Measure();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;meas2.Name = "Year";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;meas2.Expression = @"Year = ""CY"" &amp;amp; FORMAT([Date], ""yyyy"")";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;dateMeasureList.Add(meas2);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;tableDate = new Table("Date", datecolList, null, dateMeasureList);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The exception occurs in the&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;dataset = client.Datasets.PostDatasetInGroup(workspaceId, datasetReq, DefaultRetentionPolicy.BasicFIFO);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a number of other tables that Schema define and load data just fine. Its just this Date table with the measures that blowup with less than helpful exceptions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does any one have a sample ? or suggestions ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2020 18:10:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-PushDataSet-Date-Table-Measures/m-p/974471#M22693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-14T18:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: REST API PushDataSet Date Table Measures</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-PushDataSet-Date-Table-Measures/m-p/974478#M22694</link>
      <description>&lt;P&gt;You could check the Issues forum here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Issues/idb-p/Issues" target="_blank"&gt;https://community.powerbi.com/t5/Issues/idb-p/Issues&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And if it is not there, then you could post it.&lt;BR /&gt;&lt;BR /&gt;If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to &lt;A href="https://support.powerbi.com" target="_blank"&gt;https://support.powerbi.com&lt;/A&gt;. Scroll down and click "CREATE SUPPORT TICKET".&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2020 18:23:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-PushDataSet-Date-Table-Measures/m-p/974478#M22694</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-03-14T18:23:17Z</dc:date>
    </item>
  </channel>
</rss>

