Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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())
User | Count |
---|---|
83 | |
77 | |
72 | |
70 | |
55 |
User | Count |
---|---|
107 | |
98 | |
86 | |
79 | |
67 |