cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chromo4130 Member
Member

filter in DAX

 

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
AkhilAshok Established Member
Established Member

Re: filter in DAX

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

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

View solution in original post

7 REPLIES 7
affan Established Member
Established Member

Re: filter in DAX

Hi @chromo4130

 

Can you share some sample data and the result you are trying to acheive

 

Regards

Affan

chromo4130 Member
Member

Re: filter in DAX

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

chromo4130 Member
Member

Re: filter in DAX

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

affan Established Member
Established Member

Re: filter in DAX

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.

chromo4130 Member
Member

Re: filter in DAX

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.

 

Captura10.PNG

AkhilAshok Established Member
Established Member

Re: filter in DAX

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

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

View solution in original post

chromo4130 Member
Member

Re: filter in DAX

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!!!!!!!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 113 members 1,564 guests
Please welcome our newest community members: