Forum Discussion
Report Builder - Issue with line chart average
- 10 months ago
Hi Danny2020 ,
Thanks for reaching out to the Microsoft fabric community forum.Firstly to fix the error, In Report Builder and make sure the Name matches the DAX variable name exactly for example, use @Part_Number instead of PartNumber. Then, in the Parameter Value field, link it to your report parameter by setting it to =Parameters!PartNumber.Value. This ensures that the DAX query recognizes and correctly applies the parameter value passed from the report.
Additionally, make sure the parameter data type matches the column type in your model. If 'Database'[Part Number] is a text field, the report parameter should also be defined as text, if itโs numeric, then the parameter type must be numeric as well. Mismatched data types can prevent the filter from applying correctly and cause the query to fail.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Hi Danny2020 ,
For this you need to use the parameter to filter the dataset explicitly
If your dataset looks like this :
DAX
EVALUATE
SUMMARIZECOLUMNS(
'Table1'[Date],
"Average Quantity", AVERAGE('Table1'[Quantity])
)
Change the Dax query to this
DAX
EVALUATE
SUMMARIZECOLUMNS(
'Table1'[Date],
FILTER(
'Table1',
'Table1'[PartNumber] = @PartNumber
),
"Average Quantity", AVERAGE('Table1'[Quantity])
)- @PartNumber is the Report Builder parameter name.
- Make sure your parameter data type matches (e.g., text vs numeric).
โญHope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
๐กFound it helpful? Show some love with kudos ๐ as your support keeps our community thriving!
๐Letโs keep building smarter, data-driven solutions together!๐ [Explore More]