Forum Discussion

powerlight1's avatar
powerlight1
Icon for Helper I rankHelper I
1 year ago
Solved

OR condition on multiple slicers

I am trying to implement a similar solution to Solved: OR condition on multiple slicer selections - Microsoft Fabric Community but my problem is that I have 2 Tables with 1 column from each table that I am putting into 2 slicers.

 

Table1 is just date and unit sales:

 

Table 2 is an Event info:

I have created 2 slicer tables for both the slicers and they are not linked.

 

Sales date slicer:

EventName slicer:

Then I created a measure:

OR Filter =
    IF(
        MAX(Sales[Date]) IN ALLSELECTED(SalesDate[Date]) || MAX(Events[Event Name]) IN ALLSELECTED(EventName[Event Name])
        ,1
        ,0
    )

 

Finally, I want to plot a combo chart with with Sales and Event for Birthday Sales +/- 1 day (ie 2/7/25 to 6/7/25). I have put the "OR Filter" into this combo chart's filter and set it to "1"

 

However becasue Birthday Sales event is from 3/7/25 to 5/7/25, the chart is still only displaying the 3 days rather then the 5 days that I have checked in the 2 slicers:

 

Can someone help me as I'm not sure what I am doing wrong.

Thanks

 

  • Next time I'll provide data in the suggested links.

    I've worked it out.

    Thanks community for your support.

10 Replies

  • hackcrr's avatar
    hackcrr
    Icon for Memorable Member rankMemorable Member

    Hi, powerlight1 

    In your table2, EventName = Birthday Sales  

    The date range for the EventName = Birthday Sales is from March 7, 2024 - May 7, 2024. Therefore, when you select 'Birthday Sales' in the Event slicer, your chart will display data within this time range based on the relationships you have established. The criteria from your other date slicer will further filter the data based on this date range.
    You can publish your report click blow button:

     

     

    • powerlight1's avatar
      powerlight1
      Icon for Helper I rankHelper I

      hackcrr

      I am unable to publish based on the method you said as or organisation is blocked from Fabric.  I will try to publish from my private account.

       

      I don't agree with you that the relationship between the Events and Sales table are causing only 3/7-5/7 sales to be returned as I have created the OR Filter measure to also return all dates from the SalesDate table:

       

      OR Filter =
          IF(
              MAX(Sales[Date]) IN ALLSELECTED(SalesDate[Date]) || MAX(Events[Event Name]) IN ALLSELECTED(EventName[Event Name])
              ,1
              ,0
          )
  • Next time I'll provide data in the suggested links.

    I've worked it out.

    Thanks community for your support.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi powerlight1 ,

      I'm glad to hear that you were able to resolve the issue.
      If possible, could you briefly share the solution that worked for you? This information could be valuable to others in the community facing similar challenges.

      Thank you for your continued engagement with the community.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi powerlight1 ,

         

        When you have the opportunity, could you please share the solution that worked for you? This will help close the loop and provide valuable guidance to others who may encounter the same issue in the future.


        Thank you again for your valuable contribution to the community.