Forum Discussion

bhavya11's avatar
bhavya11
Regular Visitor
1 year ago
Solved

How to create dynamic filter in DAX query

Hello, I want to dynamically filter my data in PBI Report Builder using DAX expression. The columns in the filter will be added dynamically based on what the user selects in the report. It is a emb...
  • bhavya11's avatar
    bhavya11
    1 year ago

    Hello,

    Thank you for the inputs. As I want to add multiple filters dynamically, I chose the following route:

     

    EVALUATE
    FILTER(MyTable,
    AND(MyTable[col1]=@Col1Value , IF(NOT(ISBLANK(@Col2Value)), MyTable[col2]=@qCol2Value, TRUE().....))

     

    I will also try your syntax.