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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have Student table( Student Name,Subject and Score) as the data below:
| Student Name | Subject | Score |
| Student1 | Subject1 | 50 |
| Student1 | Subject2 | 67 |
| Student1 | Subject3 | 50 |
| Student1 | Subject4 | 30 |
| Student1 | Subject5 | 80 |
| Student2 | Subject1 | 66 |
| Student2 | Subject2 | 94 |
| Student2 | Subject3 | 22 |
| Student2 | Subject4 | 33 |
| Student2 | Subject5 | 45 |
| Student3 | Subject1 | 75 |
| Student3 | Subject2 | 80 |
| Student3 | Subject3 | 55 |
| Student3 | Subject4 | 84 |
| Student3 | Subject5 | 65 |
Requirements: I would like to have Status Column(using DAX), if anyone of the subject have score less than 40 then status will be BAD for each row for that Student otherwise GOOD.
example:
| Student Name | Subject | Score | Status - Calculated Column(DAX) |
| Student1 | Subject1 | 50 | BAD |
| Student1 | Subject2 | 67 | BAD |
| Student1 | Subject3 | 50 | BAD |
| Student1 | Subject4 | 30 | BAD |
| Student1 | Subject5 | 80 | BAD |
| Student2 | Subject1 | 66 | BAD |
| Student2 | Subject2 | 94 | BAD |
| Student2 | Subject3 | 22 | BAD |
| Student2 | Subject4 | 33 | BAD |
| Student2 | Subject5 | 45 | BAD |
| Student3 | Subject1 | 75 | GOOD |
| Student3 | Subject2 | 80 | GOOD |
| Student3 | Subject3 | 55 | GOOD |
| Student3 | Subject4 | 84 | GOOD |
| Student3 | Subject5 | 65 | GOOD |
How can I achieve using DAX Calculated column (not a measure) ?
Solved! Go to Solution.
Hi @Jyaul1122, Hope you are doing good !
Please try the below dax to create calculated column:
VAR name = [Student Name]
RETURN
IF(COUNTROWS(
FILTER('Student table','Student table' [Student Name] = name && "Student table' [Score] <=40))>=1, "BAD", "GOOD")
If this post helps to answer your question, please consider accepting it as a solution so others can find it more quickly when they face a similar challenge.
Proud to be a Microsoft Fabric community super user
Let's Connect on LinkedIn
Subscribe to my YouTube channel for Microsoft Fabric and Power BI updates.
Hi @Jyaul1122 ,
You can achieve this using a calculated column with a combination of CALCULATE, FILTER, and MINX. Here's one way to do it:
Status =
VAR CurrentStudent = 'Student'[Student Name]
VAR MinScore =
CALCULATE(
MINX(FILTER('Student', 'Student'[Student Name] = CurrentStudent), 'Student'[Score])
)
RETURN IF(MinScore < 40, "BAD", "GOOD")This logic checks the minimum score for each student across all their subjects. If it's below 40, it flags all rows for that student as "BAD", otherwise "GOOD".
Let me know if your actual table structure is different or if you're using a different name for the table — this can be adjusted easily.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
*This response was supported by AI for translation and text editing purposes.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 25 |
| User | Count |
|---|---|
| 124 | |
| 87 | |
| 70 | |
| 66 | |
| 65 |