Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I would like to inquire about creating a measure in Power BI that allows me to identify students who have had two opportunities. I have a table called "PRO" which includes a column called "idStd" that contains the student IDs. Additionally, I have another table called "Opp" idopp" that may have duplicate values if a student has multiple opportunities. My goal is to create a measure that, when applied to a table visual, displays the count of opportunities equal to 2 along with the list of students .
Currently, I have achieved this by applying a filter directly to the table visual, where I select the Opp"idStd" column, choose the "equal to" condition, and enter the value "2". However, I would like to convert this into a measure instead.
Thank you for your assistance.
Solved! Go to Solution.
Hi @Chelly
Have you related both tables by IdStd?
If it is the case, you just need to countrows in the Opp table
Num Opp = COUNTROWS(Opp)
and display the measure along with the list of students
P.S. If you want to display all the list but with a zero value for the ones that don't have any, use:
Num Opp =
var opport= COUNTROWS(Opp)
return IF(opport=0,0,opport)
and you will get:
Thanks, but i need to return student who have only 2
Then, return only
IF(opport=2,opport,blank())
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.