cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Filter or Slicer with OR

I would like to ask if there's any way to create a slicer or page/visual filter that allows us to use OR. For example, imagine I have a table with data from each phone call a business has had. They are divided by inbound calls and outbound calls in the [Type of phonecall] and then they are divided by campaigns. I have a page dedicated to inbound calls in which I have a page filter which is Type of phonecall is "Inbound call". Up to now everything alright, the problem is that there are two campaigns in which I'm asked to ignore whether the calls are written down as inbound or outbound, and so I would like to create a filter that would be [Type of call] = "Inbound call" OR [Campaign] = "...". I know that with written code I just apply this filters to each one of the measures used in the page, but that would create a lot of innecessary work if there's any other way, so is there any way to have what I asked for with either slicers or page filters (or any other way that doesn't require me to modify measures individually)?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver II
Resolver II

Re: Filter or Slicer with OR

Hi @antalgu ,

 

I think that you are looking for the feature called Calcultaion Groups.

 

Here is a great article which summarizes the logic & gives you an example how to use this:

https://www.sqlbi.com/articles/introducing-calculation-groups/# 

 

edit:
Adding 2 videos which are useful too:
Guy in the Cube:  https://www.youtube.com/watch?v=vlnx7QUVYME

Marco Russo from SQLBI: https://www.youtube.com/watch?v=a4zYT-N-zsU

 

Hope it helps,

PDG

View solution in original post

3 REPLIES 3
Highlighted
Super User IX
Super User IX

Re: Filter or Slicer with OR

@antalgu ,

The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in a table format?

Try these types of formulae. If they can help

 

calculate([count of call], filter(Table, not( Table[Type of call] in{"Inbound call" , "Outbound call" })))

calculate([count of call], filter(sll(Table), not( Table[Type of call] in{"Inbound call" , "Outbound call" })))

calculate([count of call], filter(sll(callType), not( callType[Type of call] in{"Inbound call" , "Outbound call" })))


Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper I
Helper I

Re: Filter or Slicer with OR

Nono, the problem that I have is this one. The type of code that you presented would work to solve the problem, but it would only solve 1 of the measures, so I'd have to make this code for 10+ measures and then a pretty similar one for 10+ more measures for the other type of calls. What I'm asking is if its possible to do this kind of things with a page filter or slicer, because I don't want to have to modify the code individually for each one of my measures

Highlighted
Resolver II
Resolver II

Re: Filter or Slicer with OR

Hi @antalgu ,

 

I think that you are looking for the feature called Calcultaion Groups.

 

Here is a great article which summarizes the logic & gives you an example how to use this:

https://www.sqlbi.com/articles/introducing-calculation-groups/# 

 

edit:
Adding 2 videos which are useful too:
Guy in the Cube:  https://www.youtube.com/watch?v=vlnx7QUVYME

Marco Russo from SQLBI: https://www.youtube.com/watch?v=a4zYT-N-zsU

 

Hope it helps,

PDG

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors