<?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 Problem using &amp;quot;d3-array&amp;quot;.rollup (and it spread argument) in a Power BI Custom Visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Problem-using-quot-d3-array-quot-rollup-and-it-spread-argument/m-p/922503#M22220</link>
    <description>&lt;P&gt;Hello to you all,&lt;/P&gt;&lt;P&gt;I am hoping someone will have a solution for a problem I have encountered using "d3-array" in a custom visual for Power BI.&lt;BR /&gt;I have been using d3 v5 as it's got really nice data munching functions that keep my code clean and give good performance; but some of these are now giving me trouble: the rollup function from "d3-array" in particular. Here a description of my situation:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;After importing d3 and rollup from d3-array (as rollup), and installing the typescript definitions, when I try to use rollup with two keys, i.e.:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Array.from(rollup(data,&amp;nbsp;([d])&amp;nbsp;=&amp;gt;&amp;nbsp;d.value,&amp;nbsp;d&amp;nbsp;=&amp;gt;&amp;nbsp;+d.date,&amp;nbsp;d&amp;nbsp;=&amp;gt;&amp;nbsp;d.name))&lt;BR /&gt;I get the following error for the above line: "Expected 3 arguments, but got 4"&lt;BR /&gt;If I remove the second or first key the above works, but then I don't get the Map I am looking for and would have liked to keep the above code as it is just so clean...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;A small part of the data for clarity:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[{"date":36526,"name":"Coca-Cola","category":"Beverages","value":72537},{"date": 36526,"name": "Microsoft","category": "Technology", "value":70196},...]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Any typescript advice on how to get this to work?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Notes:&lt;BR /&gt;Rollup takes arguments in this form:&amp;nbsp;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;reduce&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;...&lt;/SPAN&gt;&lt;SPAN&gt;keys&lt;/SPAN&gt;&lt;SPAN&gt;); so that keys can be multiple.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This works perfectly fine in a standard web page with the same d3 and d3-array libraries.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for any advice on the above&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2020 11:50:50 GMT</pubDate>
    <dc:creator>Schizzomarino</dc:creator>
    <dc:date>2020-02-05T11:50:50Z</dc:date>
    <item>
      <title>Problem using "d3-array".rollup (and it spread argument) in a Power BI Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-using-quot-d3-array-quot-rollup-and-it-spread-argument/m-p/922503#M22220</link>
      <description>&lt;P&gt;Hello to you all,&lt;/P&gt;&lt;P&gt;I am hoping someone will have a solution for a problem I have encountered using "d3-array" in a custom visual for Power BI.&lt;BR /&gt;I have been using d3 v5 as it's got really nice data munching functions that keep my code clean and give good performance; but some of these are now giving me trouble: the rollup function from "d3-array" in particular. Here a description of my situation:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;After importing d3 and rollup from d3-array (as rollup), and installing the typescript definitions, when I try to use rollup with two keys, i.e.:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Array.from(rollup(data,&amp;nbsp;([d])&amp;nbsp;=&amp;gt;&amp;nbsp;d.value,&amp;nbsp;d&amp;nbsp;=&amp;gt;&amp;nbsp;+d.date,&amp;nbsp;d&amp;nbsp;=&amp;gt;&amp;nbsp;d.name))&lt;BR /&gt;I get the following error for the above line: "Expected 3 arguments, but got 4"&lt;BR /&gt;If I remove the second or first key the above works, but then I don't get the Map I am looking for and would have liked to keep the above code as it is just so clean...&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;A small part of the data for clarity:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[{"date":36526,"name":"Coca-Cola","category":"Beverages","value":72537},{"date": 36526,"name": "Microsoft","category": "Technology", "value":70196},...]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Any typescript advice on how to get this to work?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Notes:&lt;BR /&gt;Rollup takes arguments in this form:&amp;nbsp;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;reduce&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;...&lt;/SPAN&gt;&lt;SPAN&gt;keys&lt;/SPAN&gt;&lt;SPAN&gt;); so that keys can be multiple.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This works perfectly fine in a standard web page with the same d3 and d3-array libraries.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for any advice on the above&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 11:50:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-using-quot-d3-array-quot-rollup-and-it-spread-argument/m-p/922503#M22220</guid>
      <dc:creator>Schizzomarino</dc:creator>
      <dc:date>2020-02-05T11:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using "d3-array".rollup (and it spread argument) in a Power BI Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Problem-using-quot-d3-array-quot-rollup-and-it-spread-argument/m-p/922986#M22223</link>
      <description>&lt;P&gt;I have just realised I put this in the wrong place (should be within "Custom Visuals Development Discussion"&lt;BR /&gt;&lt;BR /&gt;So I will duplicate this there, sorry... I am a newbie to the board&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 17:10:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Problem-using-quot-d3-array-quot-rollup-and-it-spread-argument/m-p/922986#M22223</guid>
      <dc:creator>Schizzomarino</dc:creator>
      <dc:date>2020-02-05T17:10:05Z</dc:date>
    </item>
  </channel>
</rss>

