cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Multiple Filter Application for Totals

How would I be able to filter all Detriot inbound and outbound results for a Yes compliance? If I select to filter detroit on inbound it ignores outbound detroit values because there were not any inbound shipments going from the same place.

My end result would be Detroit: total compliance = 3.

I would, in the end, have to find total compliance for each location.

 Inbound Outbound Comliant Detriot New York Yes Detriot New York No Detriot New York Yes Detriot New York No Detriot New York No Cincinnati New York No Cincinnati Las Vegas Yes Cincinnati Las Vegas Yes Cincinnati Detriot Yes Cincinnati Detriot No Cincinnati Houston No Cincinnati Houston Yes Cincinnati Tampa Yes New York Houston Yes New York Tampa No New York New Jersey No New York Toronto No
1 ACCEPTED SOLUTION

Accepted Solutions
Community Champion

## Re: Multiple Filter Application for Totals

@jmckentr

Hi, One way to solve this:

1. Create a New Table with the Cities. (Modeling-New Table)

Cities = DISTINCT(UNION(VALUES(Table1[Inbound]),VALUES(Table1[Outbound])))

2. Related Both Tables: (Inbound & Outbound with Cities)

Both with Cities

3. Create a measure to Count.

```TotalCompliants =
CALCULATE (
COUNT ( Table1[Inbound] ),
USERELATIONSHIP ( Cities[Cities], Table1[Inbound] )
)
+ CALCULATE (
COUNT ( Table1[Outbound] ),
USERELATIONSHIP ( Cities[Cities], Table1[Outbound] )
)```

Insert a Slicer with the cities and also a slicer to  Compliants. (or in a Page Filter)

Lima - Peru
3 REPLIES 3
Super User I

## Re: Multiple Filter Application for Totals

`@jmckentrusing intersect here is an example (would need to be reworked)`
`Plum/Elect =COUNTROWS (    INTERSECT (        CALCULATETABLE (            DISTINCT ( 'Completed Repairs'[STREET_NAME] ),            'Completed Repairs'[TradeCode] = "Elec"        ),        CALCULATETABLE (            DISTINCT ( 'Completed Repairs'[STREET_NAME] ),            'Completed Repairs'[TradeCode] = "Plum"        )    ))`

Proud a to be a Datanaut!
Frequent Visitor

## Re: Multiple Filter Application for Totals

Is there anyway to have that connected with a slicer? That way tthe viewer can select which location and the report will display the number of yes complaint results.

Community Champion

## Re: Multiple Filter Application for Totals

@jmckentr

Hi, One way to solve this:

1. Create a New Table with the Cities. (Modeling-New Table)

Cities = DISTINCT(UNION(VALUES(Table1[Inbound]),VALUES(Table1[Outbound])))

2. Related Both Tables: (Inbound & Outbound with Cities)

Both with Cities

3. Create a measure to Count.

```TotalCompliants =
CALCULATE (
COUNT ( Table1[Inbound] ),
USERELATIONSHIP ( Cities[Cities], Table1[Inbound] )
)
+ CALCULATE (
COUNT ( Table1[Outbound] ),
USERELATIONSHIP ( Cities[Cities], Table1[Outbound] )
)```

Insert a Slicer with the cities and also a slicer to  Compliants. (or in a Page Filter)

Lima - Peru

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors