0
votes

I have Power BI report having some filters implemented on columns. Now I have to add a new filter on the basis of measure, I have data in the following format for that column, +ve integer, -ve integer or 0. What I'm trying to achieve, there should be a filter with three default values (+ve integers, -ve integers and 0). When I select +ve, it should show only records having +ve integer values and so on for two other cases.

Problem: I am creating measure from a measure but not getting the exact data from it.

The second thing I did was created a measure of positive and negative, I am getting the exact data if I will use in table visual but not in the slicers form.

1

1 Answers

0
votes

Measures are not meant to be used as slicers. A best practice for Power BI is that if you need to filter by a certain criteria then you should create a new column in the data to reflect which values you want to filter by.

If you have a very large data set then I would do this in the Query Editor using a conditional column. enter image description here

If you size isn't a factor then make a calculated column like so,

Answer =
SWITCH (
    TRUE (),
    'Table'[Values] > 0, "Postive",
    'Table'[Values] < 0, "Negative",
    "Zero"
)

Now insert the column into the filter and you should be able to easily switch between what you need.