<?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: Power BI Custom Visual with React - Issue with component.tsx and update() in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visual-with-React-Issue-with-component-tsx-and/m-p/4611967#M12319</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/836341"&gt;@Andrelele&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The tutorial uses the &lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings#single-data-mapping" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;single&lt;/FONT&gt;&lt;/A&gt; mapping (&lt;A href="http://Replace%20the dataViewMappings property with the following code. max: 1 in measure specifies that only one data field can be submitted to the visual's Measure data field." target="_self"&gt;as defined in this step&lt;/A&gt;). This only ever returns a single value, as would be expected for something like a card.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want your visual to retrieve more data, you will need to choose the appropriate mapping type, define it in your capabilities and then extract and map using your code. Depending on you you want your visual to work, &lt;A title="table" href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings#mapping-tables" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;table&lt;/FONT&gt;&lt;/A&gt; might be the easiest one to start with in terms of understanding how data is sent and how you need to process it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Sun, 16 Mar 2025 20:22:38 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2025-03-16T20:22:38Z</dc:date>
    <item>
      <title>Power BI Custom Visual with React - Issue with component.tsx and update()</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visual-with-React-Issue-with-component-tsx-and/m-p/4606616#M12295</link>
      <description>&lt;P&gt;hello dear people,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in Power BI Custom Visual I try to develop a table with React and Tailwindcss. I followed along a tutorial from Microsoft to create a react-based custom visual.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/create-react-visual" target="_self"&gt;https://learn.microsoft.com/en-us/power-bi/developer/visuals/create-react-visual&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To test my custom visual I’m using the US Sales Analysis report in Power BI, which is provided in one of Microsoft’s Docs for Power BI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/develop-circle-card#prerequisites" target="_blank"&gt;https://learn.microsoft.com/en-us/power-bi/developer/visuals/develop-circle-card#prerequisites&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately my react component cannot get all the data from the Data Pane of Power BI.&lt;/P&gt;&lt;P&gt;Let me show you with some examples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Screenshot 2025-03-12 093233.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249410iE971E64192A03165/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-03-12 093233.png" alt="Screenshot 2025-03-12 093233.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 084643.png" style="width: 200px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249411i921896A0465E1FFB/image-size/small?v=v2&amp;amp;px=200" role="button" title="Screenshot 2025-03-12 084643.png" alt="Screenshot 2025-03-12 084643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what my custom visual looks like without any data selected. I paused the auto reload for it.&lt;/P&gt;&lt;P&gt;After I select one of the data like "Quantity" and click auto reload, the visual won't be rendered as shown in the following image.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 093114.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249413i4FC5A34073C71BB1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-12 093114.png" alt="Screenshot 2025-03-12 093114.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In my sourcecode I tried to debug my problem with console.log() in my component.tsx&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 093534.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249423i72709659A967413F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-03-12 093534.png" alt="Screenshot 2025-03-12 093534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 093616.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249424iE851A9503E635C91/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-03-12 093616.png" alt="Screenshot 2025-03-12 093616.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and visual.ts&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 095827.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249426iD838654407521392/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-12 095827.png" alt="Screenshot 2025-03-12 095827.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 093149.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249430i730D4D290C1F19AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-12 093149.png" alt="Screenshot 2025-03-12 093149.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can look for more in my Github repository here,&lt;A href="https://github.com/Andrelelele/power_bi_custom_visual_table_react" target="_self"&gt;&amp;nbsp;https://github.com/Andrelelele/power_bi_custom_visual_table_react&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What makes me curious is that only update() in visual.ts outputs the console.log("#### update!!!") if I click auto reload.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 093149.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249433iFBA05A2C2F7983D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-12 093149.png" alt="Screenshot 2025-03-12 093149.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I click the refresh button I get a part of my console.log() in component.tsx&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 093348.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249431i570AC12B9145DFC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-12 093348.png" alt="Screenshot 2025-03-12 093348.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but not the other console.log() in component.tsx as shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Andrelele_0-1741770734371.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249435i051310125063FE06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Andrelele_0-1741770734371.png" alt="Andrelele_0-1741770734371.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I selected "Quantity" but it is not set as a name as the header.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-03-12 100536.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1249432i7FBA23EEFCD06A75/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-03-12 100536.png" alt="Screenshot 2025-03-12 100536.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do this because I need the data to dynamically construct my table with rows and columns in my react component.&lt;/P&gt;&lt;P&gt;I hope you can help me with my issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andrelele&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  notionvc: 4e66933e-e9c3-4a7a-9380-c35b6646d2b0  --&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 09:16:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visual-with-React-Issue-with-component-tsx-and/m-p/4606616#M12295</guid>
      <dc:creator>Andrelele</dc:creator>
      <dc:date>2025-03-12T09:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Custom Visual with React - Issue with component.tsx and update()</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visual-with-React-Issue-with-component-tsx-and/m-p/4611967#M12319</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/836341"&gt;@Andrelele&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The tutorial uses the &lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings#single-data-mapping" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;single&lt;/FONT&gt;&lt;/A&gt; mapping (&lt;A href="http://Replace%20the dataViewMappings property with the following code. max: 1 in measure specifies that only one data field can be submitted to the visual's Measure data field." target="_self"&gt;as defined in this step&lt;/A&gt;). This only ever returns a single value, as would be expected for something like a card.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want your visual to retrieve more data, you will need to choose the appropriate mapping type, define it in your capabilities and then extract and map using your code. Depending on you you want your visual to work, &lt;A title="table" href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings#mapping-tables" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;table&lt;/FONT&gt;&lt;/A&gt; might be the easiest one to start with in terms of understanding how data is sent and how you need to process it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Sun, 16 Mar 2025 20:22:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visual-with-React-Issue-with-component-tsx-and/m-p/4611967#M12319</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2025-03-16T20:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Custom Visual with React - Issue with component.tsx and update()</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visual-with-React-Issue-with-component-tsx-and/m-p/4623843#M12356</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 09:21:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Power-BI-Custom-Visual-with-React-Issue-with-component-tsx-and/m-p/4623843#M12356</guid>
      <dc:creator>Andrelele</dc:creator>
      <dc:date>2025-03-25T09:21:00Z</dc:date>
    </item>
  </channel>
</rss>

