Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello,
I'm trying to add parameters to API calls. OAuth is working and I can generate a list of available datasets in a dynamic navigation table:
Here is the auth screen with no optional parameters, the one I want to appear in the screenshot above (in the right pane):
Now I can't figure out how to allow date and dimension parameters and show on right pane (the one showing error, since dates and dimensions are null).
I read the whole TripPin walkthrough several times to end up at this point, but I'm getting lost about parameters and navigation table...
Here is some relevant code:
[DataSource.Kind="PQ_SearchConsole", Publish="PQ_SearchConsole.Publish"]
shared PQ_SearchConsole.Contents = Value.ReplaceType(CreateNavTable, contentsType);
contentsType = type function (
optional start as (type text meta [
Documentation.FieldCaption = "Début",
Documentation.FieldDescription = "Date de début de l'extraction (les mots clés sont autorisés : `today`, `yesterday`, `60daysAgo`).",
Documentation.SampleValues = {"2022-01-01"}
]),
optional end as (type text meta [
Documentation.FieldCaption = "Fin",
Documentation.FieldDescription = "Date de fin de l'extraction (les mots clés sont autorisés : `today`, `yesterday`, `60daysAgo`).",
Documentation.SampleValues = {"yesterday"}
]),
optional params as (type nullable text meta [
Documentation.FieldCaption = "Dimensions",
Documentation.FieldDescription = "Saisir les dimensions souhaitées",
Documentation.SampleValues = {"query,page,device,country"}
])
) as table [...]CreateNavTable = (
optional start as text,
optional end as text,
optional params as nullable text
) as table =>
let
sites = GetSitesList(),
navBody = List.Accumulate( sites[siteUrl], {}, (state, current)=> state &
{{current, current, PQ_SearchConsole.GetContents(current,start,end,params), "Function", "Function", true}}
),
navHeader = {"Name","Key","Data","ItemKind", "ItemName", "IsLeaf"},
objects = #table(navHeader, navBody),
NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
in
NavTableGetSitesList = () as table =>
let
source = Json.Document( Web.Contents ( api_base_uri ) ),
sites = Table.FromRecords( source[siteEntry], type table[siteUrl = Text.Type /*, permissionLevel = Text.Type*/] )
in
sites;PQ_SearchConsole.GetContents = (
website as text,
start as text,
end as text,
params as nullable text
) =>
let
now = DateTime.FixedLocalNow(),
reqStartDate = Date.From(dateFunc(start)), // #date( Date.Year(now), Date.Month(now) - 1 , Date.Day(now) ),
reqEndDate = Date.From(dateFunc(end)), // #date( Date.Year(now), Date.Month(now), Date.Day(now) ),
reqDimensions = if params="" or params = null then {} else Text.Split(params,","),
source = Web.Contents( api_base_uri, [
RelativePath = Text.Combine({Uri.EscapeDataString(website), "/searchAnalytics/query"}),
Headers = [#"Content-Type"="application/json"],
Content = Json.FromValue([startDate = reqStartDate, endDate = reqEndDate, dimension = reqDimensions])
]),
report = Json.Document(source)
in
report
I must admit I'm quite puzzled there's no documentation about having parameters for functions or tables exposed as navigation in Power BI. I'm sure some connectors use this, but no way to find anything about this 😕
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Check out the July 2026 Power BI update to learn about new features.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |