Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Saving Filters as Measures

Hello Power BI Community,   I frequently find myself saving filters as VARs and then applying the variable using the CALCULATE function. See below:   myExpression = VAR testFilter = FILTER(ta...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi Anonymous ,

    As FILTER function returns a table, so you cannot save it as a measure or column, but you can save it as a new table to solve your issue, like this:

    1.Create a new table.

    2.Create relationship.

    3.Directly use the new table as a filter in your DAX.

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.