Forum Discussion
ZacWatkins
4 years agoNew Member
Count Distinct Rows where Distinct Rows have at least X occurences
Hello! I have what is most likely a measure request for sorting some data out of my general tables and into a visualization. Right now I have a table with Employees and SubmissionIDs, plus a ...
- 4 years ago
This is one way to do this:
Distinct Cnt of Employees Where Submission gt 2 = VAR __SubmissionsPerEmployee = ADDCOLUMNS( SUMMARIZE( 'Table', 'Table'[employeeName] ), "@CntOfSubmissions", CALCULATE( COUNTROWS( 'Table' ) ) ) VAR __Result = CALCULATE( DISTINCTCOUNT( 'Table'[employeeName] ), FILTER( __SubmissionsPerEmployee, [@CntOfSubmissions] > 2 ) ) RETURN __Result
YukiK
4 years agoImpactful Individual
This is one way to do this:
Distinct Cnt of Employees Where Submission gt 2 =
VAR __SubmissionsPerEmployee =
ADDCOLUMNS(
SUMMARIZE(
'Table',
'Table'[employeeName]
),
"@CntOfSubmissions", CALCULATE( COUNTROWS( 'Table' ) )
)
VAR __Result = CALCULATE( DISTINCTCOUNT( 'Table'[employeeName] ), FILTER( __SubmissionsPerEmployee, [@CntOfSubmissions] > 2 ) )
RETURN
__Result
- ZacWatkins4 years agoNew Member
This one worked a treat! Thank you so much!
- YukiK4 years agoImpactful Individual
Glad to be some help! Please give it a thums up too!