Forum Discussion

AliceW's avatar
AliceW
Icon for Power Participant rankPower Participant
5 years ago
Solved

How to get a filter to work for another table?

Hi everyone, This should have worked with a CROSSFILTER, but it didn't and I'm out of ideas. Your help would be very much appreciated! So, I have two tables, connected via a one-to-many relationshi...
  • PaulDBrown's avatar
    PaulDBrown
    5 years ago

    AliceW 

    If you create a calculated column using the code I posted:

     

    However, calculated columns are static and are set when the model is loaded. In other words, they are unaffected by filters and slicers.

     

    You need to go about this by creating a visual with a measure. First the model in this example:

     

    Then create a measure using:

     

    # of events = DISTINCTCOUNT(Event[Event])

     

    Now create a visual including the contact field from the contact table and add the above measure:

     

    Add the slicers and you get this:

     

    However, you can´t use measures to filter pages or reports, only visuals.

    I've attached the sample PBIX file