Forum Discussion

RahulKrishn's avatar
RahulKrishn
New Member
1 year ago
Solved

Bug: Power BI Report Builder - Parameter Not Declared in DAX Query with Power BI Dataset

When attempting to use a report parameter in a DAX query against a Power BI dataset, I receive the following error:

 

"The query contains the 'RequestNoParam' parameter, which is not declared."

 

This occurs even though the parameter is correctly defined and bound in the dataset properties.

 

Steps to Reproduce:
Create a Power BI dataset and publish it to the Power BI Service.

 

In Power BI Report Builder:
Connect to the dataset.
Create a report parameter named RequestNoParam (type: Text).

 

Bind it to the dataset under Dataset Properties > Parameters.

 

Use the following DAX query:

DEFINE
    VAR SelectedRequestNo = @RequestNoParam
EVALUATE
FILTER(
    'After_Action_Oracle',
    'After_Action_Oracle'[REQUEST_NO] = SelectedRequestNo
)

 

 

 

Attempt to save or run the query.

 

Expected Behavior:
The parameter should be recognized and passed into the DAX query, allowing dynamic filtering.

 

Actual Behavior:
The query fails to save or execute, with the error:

"The query contains the 'RequestNoParam' parameter, which is not declared."

 

Troubleshooting Done:
Verified parameter is bound in dataset properties.
Confirmed parameter type matches column type.
Tried using PARAMETERS(@RequestNoParam) syntax.
Recreated the parameter and dataset multiple times.
Hardcoded values work fine in the query.
Tried using TREATAS, calculated tables, and dummy references — all failed.

 

Request:
Please confirm whether this is a known issue or a regression in the July 2025 build of Power BI Report Builder. If not, please advise on a workaround or fix.

 

  • I figured it out I had to edit the query in the dataset properties instead of using query designer

1 Reply

  • I figured it out I had to edit the query in the dataset properties instead of using query designer