Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
fcucek
Frequent Visitor

Sort Parameter values in Paginated Reports (using RSCustomDaxFilter)

Hello community, 

 

know that my questions doesn't fit 100% in this thread, but didn't know where to ask else. Please help me out with this minor thing which drives me nuts. 

 

My customer wants the parameter values sorted (desc or asc - doesn't matter) which is in general a very simple order by, but is not working at all together with the default RSCustomDaxFilter. 

 

fcucek_0-1751022552237.png

EVALUATE SUMMARIZECOLUMNS('Output'[ANM2], RSCustomDaxFilter(@OutputFIRMA,EqualToCondition,[Output].[FIRMA],String))

Read about that a lot of things, tried also a lot (multiple hours - for almost nothing 😑 ). 

 

So in the back I'm using a Power BI semantic model, with a few cascading parameters on report builder end (cascading filter is a must in that case, and makes also a lot of sense). The query above is autogenerated by the parameter creation and works fine, but I don't know how to sort the values. Adding Order by brings me to this error (of course working fine without the addition of order by).

fcucek_1-1751022818434.png

 

Here also a picture from the query designer

fcucek_2-1751022948534.png

 

I am very grateful for any input!

 

1 ACCEPTED SOLUTION
v-menakakota
Community Support
Community Support

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 

View solution in original post

4 REPLIES 4
fcucek
Frequent Visitor

Thank you all for your help. Could solve it with this query

EVALUATE
DISTINCT(
SELECTCOLUMNS(
   FILTER(Output,
        PATHCONTAINS(@OutputFIRMA, 'Output'[FIRMA])
    ), 
        "ANM2",'Output'[ANM2]))
ORDER BY [ANM2] DESC

 

And additionally I used this query for the parameter value

=Join(Parameters!Firma.Value,"|")

 

Works fine now.

Cheers, 

v-menakakota
Community Support
Community Support

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 

DataNinja777
Super User
Super User

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?:

fcucek_1-1751032033891.png

 

I tried both options with same result. At the end I run in this error:

fcucek_2-1751032137489.png

 

===================================

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. 😕

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.