Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi guys,
I am currently working on a paginated report that focuses on financial data. The report comprises three main columns: Level 4, representing account details; YTD actual, showing year-to-date actual values; and YTD PY actual, displaying year-to-date prior year actual values.
One of the parameters in the report is called "Company." I am attempting to enhance the functionality of this parameter by adding a new option to the dropdown list, labeled as "All." The purpose is to allow users to select this option, indicating that they want to include data from all companies when generating and printing the reports. (the default setting will be the first parameter option)
However, I have got errors in implementing this feature. Could you assist me in finding a solution to this issue?
The original query designer looks like:
EVALUATE
SUMMARIZECOLUMNS (
'DimGroupAccountStructure'[Level4],
RSCUSTOMDAXFILTER (
@DimDateFinYear,
EqualToCondition,
[DimDate].[FinYear],
Int64
),
RSCUSTOMDAXFILTER (
@DimEntityCompanyName,
EqualToCondition,
[DimEntity].[CompanyName],
String
),
"YTD Actual", [YTD Actual],
"YTD PY Actual", [YTD PY Actual]
)
What I have done:
EVALUATE
SELECTCOLUMNS (
ADDCOLUMNS (
SUMMARIZECOLUMNS (
ROLLUPADDISSUBTOTAL ( 'DimEntity'[CompanyName], "h0" )),
"ParameterLevel", IF ( [h0], 0, 1 )
),
"ParameterCaption", SWITCH ( [ParameterLevel], 1, 'DimEntity'[CompanyName], "All"),
"ParameterValue", SWITCH([ParameterLevel],1,'DimEntity'[CompanyName], "All Companies"),
"ParameterLevel", [ParameterLevel],
"'DimEntity'[CompanyName]", SWITCH ( [ParameterLevel], 1, 'DimEntity'[CompanyName], "All" )
)
ORDER BY
[ParameterLevel],'DimEntity'[CompanyName]
2. Added a new line in CompanyName parameter Query Designer:
EVALUATE
SELECTCOLUMNS (
ADDCOLUMNS (
SUMMARIZECOLUMNS (
ROLLUPADDISSUBTOTAL ( 'DimEntity'[CompanyName], "h0" )),
"ParameterLevel", IF ( [h0], 0, 1 )
),
"ParameterCaption", SWITCH ( [ParameterLevel], 1, 'DimEntity'[CompanyName], "All"),
"ParameterValue", SWITCH([ParameterLevel],1,'DimEntity'[CompanyName], "All Companies"),
"ParameterLevel", [ParameterLevel],
"'DimEntity'[CompanyName]", SWITCH ( [ParameterLevel], 1, 'DimEntity'[CompanyName], "All" )
)
ORDER BY
[ParameterLevel],'DimEntity'[CompanyName]
Changed the Parameter filter expression: 'DimEntity'[CompanyName]= "All" || 'DimEntity'[CompanyName]= @DimEntityCompanyName
Finnaly, I got error message: the parameter CompanyName is not declear.
I am suffring from this query designer, every Dax is working on Dax studio, but when I apply in Query designer is not working.
Thanks for your help!!
Hi @Anonymous ,
The error message "the parameter CompanyName is not declared" typically indicates that there's a mismatch or an issue with how the parameter is defined or referenced in your DAX query. This can happen if the parameter is not correctly set up in the report properties or if there's a typo or inconsistency in the parameter name.
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details.
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
5 | |
4 | |
1 | |
1 | |
1 |
User | Count |
---|---|
9 | |
5 | |
4 | |
4 | |
2 |