<?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: Download Table view Data Using Button in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Download-Table-view-Data-Using-Button/m-p/4124583#M163773</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Remove Export to Excel/CSV: In the Power BI Desktop, go to View -&amp;gt; Data View, and right-click on the table you want to disable exports for. Uncheck Export Data: In the Properties pane, uncheck the Export Data option.&amp;nbsp;Create a Custom Action: In the Power BI Desktop, go to View -&amp;gt; Data View, right-click on the table, and select New Custom Action. Define Action: In the New Custom Action dialog, give the action a&amp;nbsp;&lt;A href="https://www.mgh-patientgateway.com/" target="_self"&gt;Patient Gateway&lt;/A&gt; name and define the logic to download the data (e.g., using a REST API call or DAX query). Add Button: Add a button to your report and assign the custom action to it.&amp;nbsp;Develop a Custom Visual: Create a custom visual that replaces the default table visual and disables the built-in export functionality. Implement Download Button: Add a button to the custom visual that triggers the download functionality when clicked.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2024 04:41:19 GMT</pubDate>
    <dc:creator>monica345</dc:creator>
    <dc:date>2024-08-30T04:41:19Z</dc:date>
    <item>
      <title>Download Table view Data Using Button</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Download-Table-view-Data-Using-Button/m-p/4123323#M163728</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a requirement to disable the export data option on live reports and provide a button that will do the same. The report table data should download when this button is clicked.&lt;BR /&gt;&lt;BR /&gt;any suggestions? It's pretty urgent&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 18:04:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Download-Table-view-Data-Using-Button/m-p/4123323#M163728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-28T18:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Download Table view Data Using Button</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Download-Table-view-Data-Using-Button/m-p/4124583#M163773</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Remove Export to Excel/CSV: In the Power BI Desktop, go to View -&amp;gt; Data View, and right-click on the table you want to disable exports for. Uncheck Export Data: In the Properties pane, uncheck the Export Data option.&amp;nbsp;Create a Custom Action: In the Power BI Desktop, go to View -&amp;gt; Data View, right-click on the table, and select New Custom Action. Define Action: In the New Custom Action dialog, give the action a&amp;nbsp;&lt;A href="https://www.mgh-patientgateway.com/" target="_self"&gt;Patient Gateway&lt;/A&gt; name and define the logic to download the data (e.g., using a REST API call or DAX query). Add Button: Add a button to your report and assign the custom action to it.&amp;nbsp;Develop a Custom Visual: Create a custom visual that replaces the default table visual and disables the built-in export functionality. Implement Download Button: Add a button to the custom visual that triggers the download functionality when clicked.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 04:41:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Download-Table-view-Data-Using-Button/m-p/4124583#M163773</guid>
      <dc:creator>monica345</dc:creator>
      <dc:date>2024-08-30T04:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Download Table view Data Using Button</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Download-Table-view-Data-Using-Button/m-p/4124729#M163778</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To achieve this, you can follow these steps:&lt;/P&gt;&lt;P&gt;Disable the Export Data Option:&lt;BR /&gt;If you’re using Power BI, you can disable the export data option for specific reports by going to the report settings and setting the “Export Data” option to "None".&lt;BR /&gt;For ASP.NET Core Report Viewer, you can hide the export options using the exportOptions property.&lt;BR /&gt;Create a Custom Download Button:&lt;BR /&gt;You can add a custom button to your report or web page that triggers the download of the table data. Here’s a basic example using Javascript&amp;amp;colon;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;button id="downloadButton"&amp;gt;Download Data&amp;lt;/button&amp;gt;&lt;BR /&gt;&amp;lt;table id="dataTable"&amp;gt;&lt;BR /&gt;&amp;lt;!-- Your table data here --&amp;gt;&lt;BR /&gt;&amp;lt;/table&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;document.getElementById('downloadButton').addEventListener('click', function() {&lt;BR /&gt;var table = document.getElementById('dataTable');&lt;BR /&gt;var rows = table.rows;&lt;BR /&gt;var csvContent = '';&lt;/P&gt;&lt;P&gt;for (var i = 0; i &amp;lt; rows.length; i++) {&lt;BR /&gt;var cells = rows[i].cells;&lt;BR /&gt;var rowContent = [];&lt;BR /&gt;for (var j = 0; j &amp;lt; cells.length; j++) {&lt;BR /&gt;rowContent.push(cells[j].innerText);&lt;BR /&gt;}&lt;BR /&gt;csvContent += rowContent.join(',') + '\n';&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var blob = new Blob([csvContent], { type: 'text/csv' });&lt;BR /&gt;var url = window.URL.createObjectURL(blob);&lt;BR /&gt;var a = document.createElement('a');&lt;BR /&gt;a.setAttribute('href', url);&lt;BR /&gt;a.setAttribute('download', 'table_data.csv');&lt;BR /&gt;a.click();&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;This script will create a CSV file from the table data and download it when the button&amp;nbsp;&lt;A href="https://www-costcoess.com" target="_self"&gt;&lt;SPAN&gt;costcoess&lt;/SPAN&gt;&lt;/A&gt; is clicked.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 04:37:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Download-Table-view-Data-Using-Button/m-p/4124729#M163778</guid>
      <dc:creator>Krina234pestro</dc:creator>
      <dc:date>2024-08-30T04:37:43Z</dc:date>
    </item>
  </channel>
</rss>

