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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sinigagliafeder
Frequent Visitor

Countif with a column from a different dataset

Hello everyone, 
can you please support me with the following dilemma?

I would like to have in a column the count of activities created by each user (not performed by each user, the difference is that supervisors monitors the activities but do not perform them). So what I did so far, is create a new table, get all distinct users of that specific app proceed to compute the amount of activities for each one of them. However, Im having difficulties in finding the right formula. 

As visible from Screnshot below the formula returns an error. As you can see from the formula I would like to count the activity performed for each email that should be eatual to the app user in another dataset. 

sinigagliafeder_0-1713282088630.png


Any leads?



1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @sinigagliafeder 

 

You should always provide some data when you ask people to write DAX against it.  

 

COUNTROWS takes a table as an argument, thats' what the error is telling you.

 

Try this but I'm not sure it's what you are after, I'll need to see your data and you should provide an example of the result you expect

 

= CALCULATE(COUNTROWS('Coaching Tracker'), FILTER('Coaching Tracker', RELATED('Count of Activities'[Email]) = 'Coaching Tracker'[App User]))

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @sinigagliafeder 

 

You should always provide some data when you ask people to write DAX against it.  

 

COUNTROWS takes a table as an argument, thats' what the error is telling you.

 

Try this but I'm not sure it's what you are after, I'll need to see your data and you should provide an example of the result you expect

 

= CALCULATE(COUNTROWS('Coaching Tracker'), FILTER('Coaching Tracker', RELATED('Count of Activities'[Email]) = 'Coaching Tracker'[App User]))

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.