Forum Discussion

Victormar's avatar
Victormar
Helper V
1 year ago
Solved

Reverse filtering

Hello community, hope you are all doing well.

 

I am struggling with creating a reversed filter for my report. I have tried to follow old posts from the community, but I cannot make it work.

I have a table where I have, among other columns, Part Number and Project State column, that can be either A, B, C or P.

My end goal is to be able to filter this table based on that phases, but that it filters according to this logic:

- If I select P, only A, B, C parts are shown.

- If I select C, only A and B.

- If I select A or B, only A parts are shown.

 

It doesn't seem complicated, but I cannot achieve it.

 

Thanks in advance for any help 🙂

  • lbendlin's avatar
    lbendlin
    1 year ago

     

    There are a couple of fallacies at work here.

    - you will never see P

    - the last rule seems awkward/redundant.

     

    See attached

     

6 Replies

  • Use a disconnected table to feed your slicer, and use a measure as your visual filter.

  • I tried that already, but I am unsuccessful at creating the measure. That is what I need help with

    • lbendlin's avatar
      lbendlin
      Super User

      Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

      Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

      Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

      Please show the expected outcome based on the sample data you provided.

      Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

      • Victormar's avatar
        Victormar
        Helper V

        Hello, 

        Attached a table I created with sample data. I added more columns that I mentioned to the source table, but it is as it looks.

        My idea is to create a slicer using the project state column to reverse filter the data, based on the conditions stated:

         

        ProjectLevelPart NamePart NumberStateProject State
        1Level 1asadad1234A - In WorkA
        1Level 1sfgsf1245B - In WorkB
        2Level 1fgsad1265A - In WorkA
        3Level 2asdasd1244C - In WorkC
        2Level 3sdgsg12333A - ReleasedA
        3Level 2asfdsf17888P - ReleasedP
        4Level 2asasf19877P - In WorkP
        1Level 4ert13435C - ReleasedC
        1Level 4vvbbn12334A - In WorkA

         

        Just to be clear, a slicer based on the Project State Column, result:

        - If I select P, only A, B and C are shown in the table.

        - If I select C, only A and B.

        - If I select A or B, only A.

         

        Hope it makes sense, thanks in advance for you time 🙂