Forum Discussion

Max_WH's avatar
Max_WH
Helper I
1 year ago
Solved

RSCustomDaxFilter column name with square brackets

There is a table column  'Prod'[Product[Product Division Label]] in the data model

I want to filter that column from the parameter @ProductProductDivisionLabel using the below, but error out during query validation -> No parameter match for multivalue placeholder

How to properly escape the column name with square brackets in RSCustomerDaxFilter?

RSCustomDaxFilter(@ProductProductDivisionLabel,EqualToCondition,[Prod].[Product[Product Division Label]]],String)

  • Hi Max_WH ,

    Thank you Aala_Ali  for the workaround suggestion.
    You're absolutely right to dig into escaping syntax, but unfortunately, RSCustomDaxFilter does not support escaping nested square brackets within column names. The parser expects a clean [Table].[Column] format, and any additional brackets inside the column name will break validation.
    Unlike DAX or M expressions where certain escape sequences might be allowed, RSCustomDaxFilter is a custom expression used in paginated reports and doesn’t offer a way to escape or quote complex column names. It treats square brackets as structural delimiters, not literal characters.

    Warm Regards,
    Chaithra E.

3 Replies

  • Aala_Ali's avatar
    Aala_Ali
    Most Valuable Professional

    Hi Max_WH ,

    The issue here isn’t with RSCustomDaxFilter itself, but with how the column name is being referenced — the inner square brackets in your column name cause parsing errors.

    Why this happens:
    RSCustomDaxFilter expects a straightforward [Table].[Column] syntax, but your column is Product[Product Division Label] inside another bracket, which confuses the parser.

    Solution Options:

    Rename the Column

    If possible, rename your column in the model to avoid inner brackets:

    'Prod'[Product Division Label]

    or

    'Prod'[Product_Division_Label]


    Then use:

    RSCustomDaxFilter(
    @ProductProductDivisionLabel,
    EqualToCondition,
    [Prod].[Product Division Label],
    String
    )


     Create a Calculated Column as an Alias

    If you can’t rename the original column:

    Create a calculated column with a clean name:

    ProductDivisionLabel_Alias = 'Prod'[Product[Product Division Label]]


    Use the alias in your filter:

    RSCustomDaxFilter(
    @ProductProductDivisionLabel,
    EqualToCondition,
    [Prod].[ProductDivisionLabel_Alias],
    String
    )

     

    Let me know if this works — if it does, please mark this as the accepted solution so others can find it, and feel free to give kudos 👍.

    • Max_WH's avatar
      Max_WH
      Helper I

      Thank you! 

      Yes, that's RSCustomDaxFilter definition itself.

      But would like to know if there is anyway to escape the column square brackets in the formula....

      • v-echaithra's avatar
        v-echaithra
        Community Support

        Hi Max_WH ,

        Thank you Aala_Ali  for the workaround suggestion.
        You're absolutely right to dig into escaping syntax, but unfortunately, RSCustomDaxFilter does not support escaping nested square brackets within column names. The parser expects a clean [Table].[Column] format, and any additional brackets inside the column name will break validation.
        Unlike DAX or M expressions where certain escape sequences might be allowed, RSCustomDaxFilter is a custom expression used in paginated reports and doesn’t offer a way to escape or quote complex column names. It treats square brackets as structural delimiters, not literal characters.

        Warm Regards,
        Chaithra E.