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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

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
Community Champion
Community Champion

@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
Community Champion
Community Champion

@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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.