Forum Discussion
Filtering/duplicates/count words - not sure where this would sit in Power BI topics
- Anonymous2 years ago
Hi Whibley92 ,
As you said, there can only be two arguments after the filter, so if you want to make a judgment based on two conditions, then you can use the logical operator || to splice the two arguments together.Measure
Incomplete Both Courses = COUNTROWS( FILTER( SUMMARIZE( FILTER( 'Table', 'Table'[Status] = "Incomplete" || 'Table'[Status] = "Pending" ), 'Table'[Learner number], "Incomplete Count", COUNT('Table'[Status]) ), [Incomplete Count] = 2 ) )Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Whibley92 ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Create a measure
Incomplete Both Courses =
COUNTROWS(
FILTER(
SUMMARIZE(
FILTER(
'Table',
'Table'[Status] = "Incomplete"
),
'Table'[Learner number],
"Incomplete Count",
COUNT('Table'[Status])
),
[Incomplete Count] = 2
)
)
Apply to the filter
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Whibley922 years ago
Helper II
This works great thank you.
How would I add more than one status types to count - I forgot we also have a Pending which needs to be included. I tried "Incomplete", "Pending" but it says - Too many arguments were passed to the FILTER function. The maximum argument count for the function is 2.
Would I just add a new column and mark Pending as Incomplete?
- Anonymous2 years agoNot applicable
Hi Whibley92 ,
As you said, there can only be two arguments after the filter, so if you want to make a judgment based on two conditions, then you can use the logical operator || to splice the two arguments together.Measure
Incomplete Both Courses = COUNTROWS( FILTER( SUMMARIZE( FILTER( 'Table', 'Table'[Status] = "Incomplete" || 'Table'[Status] = "Pending" ), 'Table'[Learner number], "Incomplete Count", COUNT('Table'[Status]) ), [Incomplete Count] = 2 ) )Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Whibley922 years ago
Helper II
hi Anonymous
possibly easy enough but I tried amending your formula to show only those who have completed both courses, but its bringing up blank:
Complete Both Courses =COUNTROWS(FILTER(SUMMARIZE(FILTER('Learning Item Status report','Learning Item Status report'[Status Overall] = "Complete"),'Learning Item Status report'[Person Number],"Complete Count",COUNT('Learning Item Status report'[Status Overall])),[Complete Count] = 2))