Forum Discussion
Integrate PowerBI with Netsuite
Hi JinJia
The ability to connect NetSuite to Power BI is a common, highly requested idea on the Power BI ideas website. As such, there is very little information available regarding how to connect NetSuite to Power BI. Elegant alternative solutions that integrate NetSuite to Power BI by automating data refresh.
- Purchase the SuiteAnalytics Connect (ODBC) functionality from NetSuite
- Leverage NetSuiteās Web Query report functionality
Thanks.
- EP_Jack8 years agoRegular Visitor
If you enable webquery on a saved report, you can then download a .igy file,
open this in a text editor strip out everything before htts:\\
and strip out the following from the end
Formatting=All
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=Falsereplace
["emailaddress","Please enter your email address:"]
with
then copy the string and go into PBI and got o data sources and use a web data source, paste this in and use an anonmous authentication, and away you go
i've also created a powershell scrip with a smilar function to sync to local MSSQL DB and then you can point PBI to a SQL DB, personal prefernce which way round you want to access your data
- SQLMonger8 years agoAdvocate II
Would you be willing to share the PowerShell script you create for pulling data from NetSuite?
- EP_Jack8 years agoRegular Visitor
sure this is the PSS i used to go into a local SQl server
Invoke-Sqlcmd -Query "DELETE FROM [Netsuite].[dbo].[Customer_Product_Sales];" -ServerInstance "#########\SQLEXPRESS"
$url ="web address from Netuite as described in my original post"$WebResponse = Invoke-WebRequest -uri $url
$content = $WebResponse.Content
$content = $content.replace('<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body><table>', "" )
$content = $content.replace('</table></body></html>', "")
$content = $content.replace('</td>', "")
$content = $content.replace('</tr>', "")
$content = $content.replace('<tr>', "#" )
$content = $content.replace('<td>', "^^")
$content = $content.replace("`t|`n|`r", "")
$array = $content.Split('#')
ForEach ($tr in $array)
{
$TD = $tr.Split('^^')
if ($TD.count -gt 1)
{
$CustomerID = $TD[4] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=","" -replace "'",""
$Customer = $TD[6] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=","" -replace "'",""
$Customer_Ref = $TD[8] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=","" -replace "'",""
$QTY = $TD[10] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=",""
$Year = $TD[12] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=","" -replace "'",""
$yyy_MM = $TD[14] -replace "`n","" -replace "`r","" -replace "'",""
$Total_Revenue = $TD[16] -replace "`n","" -replace "`r","" -replace "=",""
$Brand = $TD[20] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=","" -replace "'",""
$Category = $TD[22] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=","" -replace "'",""
$Item = $TD[24] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=","" -replace "'",""
$Description = $TD[26] -replace "`n","" -replace "`r","" -replace "=-","" -replace "=","" -replace "'",""Invoke-Sqlcmd -Query "INSERT INTO [Netsuite].[dbo].[Customer_Product_Sales] (Customer_ID , Customer , Brand , Category , Item , Customer_Ref , Description , Qty , Total_Revenue, Year , YYYY_MM) VALUES ('$CustomerID', '$Customer', '$Brand', '$Category', '$Item', '$Customer_Ref', '$Description', '$Qty', '$Total_Revenue', '$Year', '$yyy_MM');" -ServerInstance "#######\SQLEXPRESS"
}}
- Anonymous8 years agoNot applicable
Check out www.tacticalconnect.com for a solution.