Forum Discussion

ArvindBhatt's avatar
ArvindBhatt
Frequent Visitor
1 year ago
Solved

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...
  • Anonymous's avatar
    Anonymous
    1 year ago

    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.