Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

[Expression.Error] 3 arguments were passed to a function which expects 1.Automatic refresh Failed

Hi,

Automatic refresh failed in power bi service online. It throwing an error [Expression.Error] 3 arguments were passed to a function which expects 1. Table BlogPostTotal.

 

The below Power query I have created in custom connector. It works in power bi desktop but not works in automatic refresh in power bi online. Please advise.

 

[DataSource.Kind="HubSpot", Publish="HubSpot.UI"]

shared HubSpot.Contents = Value.ReplaceType(HubSpotCore.Contents, type function (#"Hubspot Connector" as Uri.Type) as any);

shared HubSpotCore.Contents = () =>

let
source = #table({"Name", "Data", "ItemKind", "ItemName", "IsLeaf"}, {
{ "Blog Posts Total", BlogPostTotal(), "Table", "Table", true }
}),
navTable = Table.ToNavigationTable(source, {"Name"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
in
navTable;

BlogPostTotal = () as table =>
let
finalUrl = "https://api.hubspot.com/activities/v2/reports/blog-posts/total?portalId=4490686&clienttimeout=10000&...",
portalId=4490686&clienttimeout=10000&start=20190126&end=20190224&sort=rawViews&sortDir=DESC&limit=100&offset=0&useForeignIndex=true",
content = Web.Contents(finalUrl),
#"Imported JSON" = Json.Document(content),
#"Converted to Table" = Record.ToTable(#"Imported JSON")

in
#"Converted to Table";



 

Thanks

Vinoth

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

I think that should be the issue of your data source.  As there is no connector for HubSpot in Power BI desktop. you can consider to create ODBC data source by after installing the HubSpot ODBC Driver, then connect to the ODBC data source in Power BI Desktop. Then configure the on-prem gateway to set the scheduled refresh of the dataset. Also there is an idea about that, you can vote it up.

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7836831-hubspot-as-a-data-source

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi,

I connected the datasource as Rest API connector. I visited the url that you sent me.

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7836831-hubspot-as-a-data-source

 @Jeff  mentioned Rest API is working fine.

 

But in my case I unable to find the root cause. As per the microsoft blog, I followed the custom connector Oauth2 template.

https://docs.microsoft.com/en-us/power-query/creatingfirstconnector

Please advise. 

 

Thanks

Vinoth

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors