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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Finding the distinct IDs from filtered data

Measure Trainees Completed Course =
CALCULATE (
COUNTROWS(Training),
FILTER (
Training,
SEARCH ( "Completed", Training[Status],, BLANK () ) > 0
|| SEARCH ( "Complete", Training[Status],, BLANK () ) > 0
)
)
 
From my measure above, I'm trying to determine the count of unqiue traineeIDs that fulfill the filter requirements. I've tried applying the distinct function to the COUNTROWS(Training) and selecting for the trainee ID column in the training table, while applying the ALL function inside the FILTER function but that didn't work. How would I go about getting only the distinct values for this calculation?
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

this did not work for you ?

CALCULATE (
distinctcount(Training[trainee id]),
FILTER (
Training,
SEARCH ( "Completed", Training[Status],, 0 ) > 0
|| SEARCH ( "Complete", Training[Status],, 0) > 0
)
)
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

vanessafvg
Super User
Super User

@Anonymous  not sure i quite understand what you asking, did you say you tried this

Measure Trainees Completed Course =
CALCULATE (
    DISTINCTCOUNT ( [trainingid] ),
    FILTER (
        Training,
        SEARCH ( "Completed", Training[Status],, BLANK () ) > 0
            || SEARCH ( "Complete", Training[Status],, BLANK () ) > 0
    )
) but it didn't work? What are you trying to do?  





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

@Anonymous  not sure i quite understand what you asking, did you say you tried this

Measure Trainees Completed Course =
CALCULATE (
    DISTINCTCOUNT ( [trainingid] ),
    FILTER (
        Training,
        SEARCH ( "Completed", Training[Status],, BLANK () ) > 0
            || SEARCH ( "Complete", Training[Status],, BLANK () ) > 0
    )
) but it didn't work? What are you trying to do?  





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




amitchandak
Super User
Super User

this did not work for you ?

CALCULATE (
distinctcount(Training[trainee id]),
FILTER (
Training,
SEARCH ( "Completed", Training[Status],, 0 ) > 0
|| SEARCH ( "Complete", Training[Status],, 0) > 0
)
)
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Yes it worked, thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors