Forum Discussion

Markzolotoy's avatar
Markzolotoy
Impactful Individual
5 years ago

Paginated report parameter in DAX

If I have this expression:

COUNT(Table1[Field1])

Can use a report parameter n a place of a table name? Something like this:

COUNT(@parameter_TableName[Field1])

 

Thanks

9 Replies

  • bradsy's avatar
    bradsy
    Microsoft Employee

    Yes you should be able too if your query is also an expression.

    • Markzolotoy's avatar
      Markzolotoy
      Impactful Individual

      Yes, it is a DAX expression that is created in the Design mode. Is that what you are saying?

      • bradsy's avatar
        bradsy
        Microsoft Employee

        It takes a bit of finageling, but you can probably get it to work. A very simple expression example for a SQL query. ="Select * from " & Parameters!Customers.Value

         

        Yours might be more like ="COUNT(" & Parameters.parameter_TableName.Value + "[Field1])"