Forum Discussion

swheeler's avatar
swheeler
Regular Visitor
3 years ago
Solved

dynamic filtering of a virtual table using a measure

Hello

 

I'm looking for advice on an issue (I'm new to Power BI).  I have data that is used for benchmarking.  The relevant table contains both the data to be benchmarked (dataA) and the data against which it will be benchmarked (dataB).

 

To separate the data so that dataA is not included in dataB, as it's not good practice to include the data to be benchmarked in the data that it will be benchmarked against, I have created a virtual table that is filtered by a measure [Active Org].  The measure is controlled by a slicer that selects the client allowing us to see their data (dataA) in comparison with dataB.

 

This virtual table it relatively straightforward:

 

VirtualTable1 = filter(DataTable,DataTable[OrgID] = [Active Org])
 
the table itself doesn't appear to physically filter, but measures based on the table respond to the slicer.
 
What I'd like to do it create the corresponding table containing dataB using the opposite command, such as:
 
VirtualTable2 = filter(DataTable,DataTable[OrgID] <> [Active Org])
 
but . . . I can't get this to work at all.
 
Can anybody advice here, please?
 
Kind regards
  • calculated table is not supposed to be responsive to the slicer. I would suggest you simplify your report, upload your pbix file here and let us see how it could be solved.

4 Replies

  • calculated table is not supposed to be responsive to the slicer. I would suggest you simplify your report, upload your pbix file here and let us see how it could be solved.

    • swheeler's avatar
      swheeler
      Regular Visitor

      thank you very much - I'm not oging to upload the pbix, but I take your point and advice.

       

       

  • You could try this:

     

    VirtualTable2 = filter(DataTable,NOT(DataTable[OrgID] = [Active Org]))

  • swheeler's avatar
    swheeler
    Regular Visitor

    thank you - unfortunately that doesn't work