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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ArvindBhatt
Frequent Visitor

I created .pbit file and while opening it does not prompt for the parameter.

I created pbit file which asks for AccountId and CustomQuery parameter. while using connector from powerbi it works fine.
but when saving it as pbit file and opening it in another system it uses the same accountid used while saving the pbit file.

 

shared Docusign = (AccountId as text, optional CustomQuery as text) =>
    let
        EffectiveQuery = if CustomQuery <> null then CustomQuery else "",

        // Construct the main table with a consistent folder name
        objects = #table(
            {"Name", "Key", "Data", "ItemKind", "ItemName", "IsLeaf"},
            {
                {"CustomFields", "CustomFields", DocuConnector.CallAnalyticsAPI(AccountId,"customfields_reporting_0001","ReportingCustomFieldsMv", EffectiveQuery), "Table", "Table", true},
                {"Agreements", "Agreements", Table.RenameColumns(DocuConnector.CallAnalyticsAPI(AccountId,"urepo_reporting_0003","ReportingAgreementMv", EffectiveQuery), {{"Id", "AgreementId"}}), "Table", "Table", true}
 
        ),

        // Explicitly map the folder structure by renaming
        NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
    in
    NavTable;

 

 

Here AccountId and  CustomQuery comes as prompt.
same behaivour i wanted while opening the pbit file.

6 REPLIES 6
v-pbandela-msft
Community Support
Community Support

Hi @ArvindBhatt,

I wanted to follow up since we haven't heard back from you regarding our last response. We hope your issue has been resolved.
If the community member's answer your query, please mark it as "Accept as Solution" and select "Yes" if it was helpful.
If you need any further assistance, feel free to reach out.

Please continue using Microsoft community forum.

Thank you,
Pavan.

v-pbandela-msft
Community Support
Community Support

Hi @ArvindBhatt,

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, kindly "Accept  as  Solution" and give it a 'Kudos' so others can find it easily.

Thank you,
Pavan.

v-pbandela-msft
Community Support
Community Support

Hi @ArvindBhatt,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept  as  Solution" and give a 'Kudos' so other members can easily find it.

Thank you,
Pavan.

BeaBF
Super User
Super User

@ArvindBhatt Hi! your M code should explicitly handle when accountid is missing, try with:

 

shared Docusign = (AccountId as nullable text, optional CustomQuery as nullable text) =>
let
EffectiveQuery = if CustomQuery <> null then CustomQuery else "",
EffectiveAccountId = if AccountId <> null and AccountId <> "" then AccountId else error "AccountId is required!",

// Construct the main table
objects = #table(
{"Name", "Key", "Data", "ItemKind", "ItemName", "IsLeaf"},
{
{"CustomFields", "CustomFields", DocuConnector.CallAnalyticsAPI(EffectiveAccountId, "customfields_reporting_0001", "ReportingCustomFieldsMv", EffectiveQuery), "Table", "Table", true},
{"Agreements", "Agreements", Table.RenameColumns(DocuConnector.CallAnalyticsAPI(EffectiveAccountId, "urepo_reporting_0003", "ReportingAgreementMv", EffectiveQuery), {{"Id", "AgreementId"}}), "Table", "Table", true}
}
),

// Explicitly map the folder structure
NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
in
NavTable;

 

BBF

@BeaBF I tried with above change
it does not even prompt for accountId while connecting the connector itself from powerbi desktop
without nullable prompt is coming but only while connecting to connector not in case when i'm opening the pbit file.

Hi @ArvindBhatt,

Thank you for reaching out in Microsoft Community Forum.

Thank you @BeaBF  for the helpful response.

Please follow below steps to resolve the error;

1, Please Use optional Instead of nullable
shared Docusign = (optional AccountId as text, optional CustomQuery as text) =>
let
EffectiveQuery = if CustomQuery <> null then CustomQuery else "",
EffectiveAccountId = if AccountId <> null and AccountId <> "" then AccountId else error "AccountId is required!",

// Construct the main table
objects = #table(
{"Name", "Key", "Data", "ItemKind", "ItemName", "IsLeaf"},
{
{"CustomFields", "CustomFields", DocuConnector.CallAnalyticsAPI(EffectiveAccountId, "customfields_reporting_0001", "ReportingCustomFieldsMv", EffectiveQuery), "Table", "Table", true},
{"Agreements", "Agreements", Table.RenameColumns(DocuConnector.CallAnalyticsAPI(EffectiveAccountId, "urepo_reporting_0003", "ReportingAgreementMv", EffectiveQuery), {{"Id", "AgreementId"}}), "Table", "Table", true}
}
),

// Explicitly map the folder structure
NavTable = Table.ToNavigationTable(objects, {"Key"}, "Name", "Data", "ItemKind", "ItemName", "IsLeaf")
in
NavTable


2. Please Manually Reset Parameters in Power BI
Open the .pbit file → Transform Data → Edit Parameters → Enter AccountId → Apply.

3. Remove any existing AccountId value in Power Query before saving as .pbit.

Please continue using Microsoft community forum.

If you found this post helpful, please consider marking it as "Accept as Solution" and give it a 'Kudos'. if it was helpful. help other members find it more easily.

Regards,
Pavan.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors