- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

# filter in DAX

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 11:15 AM

Hi Community I need some help....Im trying to build a DAX but I need to filter certain words which are in other column.

Any suggestion to improve my DAX:

MAL ASIGN = CALCULATE(COUNTROWS(base);

ALLEXCEPT(Base;Base[MAL ASIGNADO]);

ALL(Base[MAL ASIGNADO];Base[MAL ASIGNADO]);

Base[MAL ASIGNADO]=1)

That formula is working but I still need to add 4 filters which are in a column of my table... how can I solve this? ...I need to add the filter in this formula to get the right result.

Solved! Go to Solution.

Accepted Solutions

## Re: filter in DAX

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 12:50 PM

For your example shown in pcture, you could do something like this:

Measure = CALCULATE ( COUNTROWS ( Table ), NOT ( Table[CRANCOT2] IN { 910, 500, 502 } ) )

All Replies

## Re: filter in DAX

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 11:18 AM

## Re: filter in DAX

[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 11:24 AM - edited 11-22-2018 11:26 AM

it is a huge pbix... can you give me and idea or something to try @affan?

## Re: filter in DAX

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 11:27 AM

where I should add a filter in that dax formula...I could use "IN" or filter function?

## Re: filter in DAX

[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 11:49 AM - edited 11-22-2018 11:49 AM

I mean to say that you can copy 5-10 rows of the table in excel and copy paste it in the post here and then what should be the result of the measure.

Please see this blog post to get your questions answered quickly on community.

## Re: filter in DAX

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 12:33 PM

Hi @affan, the idea is what I show you in the picture, the problem is that I have to make no consider the bunch of filters there is everywhere in the model.

## Re: filter in DAX

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 12:50 PM

For your example shown in pcture, you could do something like this:

Measure = CALCULATE ( COUNTROWS ( Table ), NOT ( Table[CRANCOT2] IN { 910, 500, 502 } ) )

## Re: filter in DAX

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-22-2018 01:24 PM

THANK YOU @AkhilAshok@!!!!!! SO CLAIR...IN THIS CASE THE FORMULA WORKED perfect and it looks like this

MAL ASIGN = CALCULATE(COUNTROWS(base);

NOT Base[CCVISITA] IN {"910"; "500";"502";"501"} ;

ALLEXCEPT(Base;Base[MAL ASIGNADO]);ALL(Base[MAL ASIGNADO];

Base[MAL ASIGNADO]);Base[MAL ASIGNADO]=1;'Grupo R'[RECURSO (groups)]="RE")

Really thank you!!!!!!!