Forum Discussion
Sort Parameter values in Paginated Reports (using RSCustomDaxFilter)
- 1 year ago
Hi fcucek ,
Thanks for reaching out to the Microsoft fabric community forum.
Please go through the below solved issue which may help you to resolve the issue.
Solved: RSCustomDaxFilter Documentation - Microsoft Fabric Community
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Best Regards,
Menaka.
Community Support Team
Hi fcucek ,
This is a common challenge in Power BI Paginated Reports that stems from a syntax conflict within the query designer. The error "No parameter match for multivalue placeholder" occurs because the parser cannot correctly interpret an ORDER BY clause when it's used directly with the proprietary RSCustomDaxFilter function. The most reliable way to resolve this is to restructure the DAX query by isolating the filtering logic into a variable. This makes the query unambiguous for the Report Builder parser. You can achieve this by defining a variable that holds the filtered table generated by SUMMARIZECOLUMNS and then applying the ORDER BY clause to the result of that variable. You can use ASC for ascending order or DESC for descending.
EVALUATE
VAR __DS =
SUMMARIZECOLUMNS (
'Output'[ANM2],
RSCustomDaxFilter (
@OutputFIRMA,
EqualToCondition,
[Output].[FIRMA],
String
)
)
RETURN
__DS
ORDER BY [ANM2] ASC
An alternative, more compact method is to nest the SUMMARIZECOLUMNS expression directly inside an ORDER BY function. While this can work, the variable-based approach above is generally more robust against parsing issues.
EVALUATE
ORDER BY (
SUMMARIZECOLUMNS (
'Output'[ANM2],
RSCustomDaxFilter (
@OutputFIRMA,
EqualToCondition,
[Output].[FIRMA],
String
)
),
'Output'[ANM2], ASC
)
To implement either solution, open the dataset properties for your parameter in Report Builder, switch from the visual designer to the text-based query editor, and replace the auto-generated query with one of the corrected versions. This will ensure your parameter's value list is correctly sorted when the report is run.
Best regards,
Everything you say makes perfect sense, but it didn't work right away.
Maybe I'm doing something wrong here?:
I tried both options with same result. At the end I run in this error:
===================================
Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. (MDXQueryGenerator)
------------------------------
Speicherort des Programms:
bei Microsoft.ReportingServices.MDXQueryGenerator.Utils.GetFilter(RsPlaceholderContent content, MDXQuerySpecification specification, DaxQueryGenerator generator)
bei Microsoft.ReportingServices.MDXQueryGenerator.Utils.ReplaceRsPlaceholderQueryDesigner(RsPlaceholderContent content, String daxQuery, MDXQuerySpecification specification, DaxQueryGenerator generator, Boolean ignoreFilter)
bei Microsoft.ReportingServices.MDXQueryGenerator.Engine.ReplaceRsPlaceholderInQuery(String textOfQuery, Boolean ignoreFilter)
bei Microsoft.ReportingServices.MDXQueryGenerator.Engine.QueryPreparation.DoPrepareQueryObj(AdomdConnection connection, String textOfQuery, Parameters parameters, String cubeName)
bei Microsoft.ReportingServices.MDXQueryGenerator.Engine.QueryPreparation.PrepareQueryObjCore(AdomdConnection connection, String textOfQuery, Parameters parameters, String cubeName)
bei Microsoft.ReportingServices.QueryDesigners.ASDesigner.QueryBuilderClientControl.RawMDXState.QueryPreparationManager.PreparationThreadProc()
That's happening if I exchange the query within the query editor as mentioned by you.
If I'm just replacing it "outside" I get the same error as mentioned in the earlier post. 😕