Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to filter a table using a measure

Hello, I need some help on how to filter a table using a measure.  I need to create a table from a filtered table, but I created a measure that captures different slicer values and that is what I would like to use to filter. Here is my code for the filtered table I would like:

SELECTCOLUMNS(FILTER('Revenue by Region','Revenue by Region'[Customer]=[Selected]),"Customer",'Revenue by Region'[Customer]))
So the [Selected] is my measure, but this currently returns an empty table.  My measure does
work correctly so the issue is just when I try to filter based on the measure. I even selected a specific customer to filter by and replaced my measure in the code and that seemed to work fine as well, so the code and measure work independently just not together.
Any assitance would be greatly appreciated.
Thanks.
  • Calculated tables are only evaluated during a data refresh operation. They cannot take slicer selections into consideration as slicers can only operate after the data refresh has finished.

     

    So you'll need to look for a different solution to whatever problem you are trying to solve as a calculated table is not the correct approach if you need to use selections from slicers. You'll need to look at some measure based solution.

2 Replies

  • Calculated tables are only evaluated during a data refresh operation. They cannot take slicer selections into consideration as slicers can only operate after the data refresh has finished.

     

    So you'll need to look for a different solution to whatever problem you are trying to solve as a calculated table is not the correct approach if you need to use selections from slicers. You'll need to look at some measure based solution.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Got it. Well thank you this was very helpful. I am new to power bi so I was hoping this would work but good to know that it will not. Thanks again