Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am a beginner in power BI. So, excuse me if this is a basic question.
I have data like this:
User1 - Task A - Complete User1 - Task B - InComplete User1 - Task C - Complete User 2 - Task A - Complete User 2 - Task B - Complete User 2 - Task C - Complete
Now, I want to get the number of distinct users in the list who have completed all the tasks in power BI. So, for the above example, there is only one user(User2) who have completed all three tasks. I have 7 such tasks and thousands of users, how do i get the number of distinct users that completed all the tasks, something like a DAX formula.
Solved! Go to Solution.
Hello @sindhusabbineni
We just need a couple measure. The first one to count the number of copleted lines. If your User / Task combination is unique, meaning the same User / Task will not appear in your table more than once, you can do it with just this.
Completed Count = CALCULATE( COUNTROWS ( Table ), Table[Complete/incomplete] = "Complete" )
If they can be duplicated then you will need something like this
Completed Count = CALCULATE( COUNTROWS( SUMMARIZE('Table','Table'[User],'Table'[Task]) ),Table[Complete/incomplete] = "Complete")
Then we do a measure to count the users where our [Completed Count] = 7
Users 7 completed count = COUNTROWS( FILTER( DISTINCT('Table'[User]), [Completed Count] = 7 ) )
If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!
@sindhusabbineni the following measure gives you count of "complete" task by user
Complete_Count Measure= COUNTROWS ( SUMMARIZE ( FILTER ( TaskTable, TaskTable[Complete/incomplete] = "Complete" ), TaskTable[User], TaskTable[Task] ) )
Hello @sindhusabbineni
We just need a couple measure. The first one to count the number of copleted lines. If your User / Task combination is unique, meaning the same User / Task will not appear in your table more than once, you can do it with just this.
Completed Count = CALCULATE( COUNTROWS ( Table ), Table[Complete/incomplete] = "Complete" )
If they can be duplicated then you will need something like this
Completed Count = CALCULATE( COUNTROWS( SUMMARIZE('Table','Table'[User],'Table'[Task]) ),Table[Complete/incomplete] = "Complete")
Then we do a measure to count the users where our [Completed Count] = 7
Users 7 completed count = COUNTROWS( FILTER( DISTINCT('Table'[User]), [Completed Count] = 7 ) )
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |