Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Count all with filter from another table (active contacts with active account in sweden)

Hi 

 

I am trying to create a measure that count all active contacts with a related active account where account country equals sweden

 
I am able to count all contacts but I get error when I try to add account filter. 
Measure antall kontakter = COUNTROWS(FILTER(Contact;Contact[statuscode]=1 ))
 
I assume I must add (FILTER(Account;Account[statuscode]=1 ) and (FILTER(Account;Account[Country]="sweden" ) but I cant get it to work.
 
Can someone plase help me with the syntax? 
 
Many thanks for any help!

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You will probably end up with something like this.

 

Calculate (countrows(Table),  Column = 1 , Column = "Sweden")

 

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Nathaniel_C
Super User
Super User

Hi @Anonymous ,

 

Would you share a picture of your model, or a mockup? Are the tables related?

 

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Anonymous ,

 

You will probably end up with something like this.

 

Calculate (countrows(Table),  Column = 1 , Column = "Sweden")

 

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thanks for your answer!

 

I think this will work. One issue was I had to use ; instad of ,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors