Forum Discussion

tonysantangelo's avatar
tonysantangelo
Frequent Visitor
3 years ago

Two Filters from One Slicer

I'm trying to use a date slicer to ultimately filter a fact table where each row represents an event, but the logic is tricky and relies on a helper table. The date slicer has a granularity of selecting months or years, no quarters or days.

 

Fact/event table columns: DeviceId, EventDate, EventMonth (same as EventDate but the 1st of the month)

Helper table columns: DeviceId, EligibilityMonth (date that is the 1st of the month)

 

Desired filter logic:

1. Only rows with EventDate within the month(s) selected

2. Only rows with DeviceIds that are eligible in ALL the month(s) selected

 

1 is easy on its own. 2 is a little trickier, but I've found guides for making a slicer do AND logic rather than OR with the selected values (one guide). Where I'm stuck is combining the two parts of filter logic at the same time. I think this is doable if I had two date slicers, but that's not ideal, and would require some way to ensure the user selects the same month(s) in both. Any suggestions?

 

What I've tried: Making two relationships between the fact/event table and helper table, DeviceId to DeviceId and EventMonth to EligibilityMonth. However, Power BI limits me to one active relationship.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tonysantangelo ,

    All this you say is vague. Could you please provide more details with your desired output and pbix file without  priavcy information? 

     

    How to Get Your Question Answered Quickly 

     

    Best Regards

    Community Support Team _ Polly

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.