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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jyaul1122
Helper III
Helper III

Status based on score

Hi,

I have Student table( Student Name,Subject and Score) as the data below:

Student NameSubjectScore
Student1Subject150
Student1Subject267
Student1Subject350
Student1Subject430
Student1Subject580
Student2Subject166
Student2Subject294
Student2Subject322
Student2Subject433
Student2Subject545
Student3Subject175
Student3Subject280
Student3Subject355
Student3Subject484
Student3Subject565

 

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 NameSubjectScoreStatus - Calculated Column(DAX)
Student1Subject150BAD
Student1Subject267BAD
Student1Subject350BAD
Student1Subject430BAD
Student1Subject580BAD
Student2Subject166BAD
Student2Subject294BAD
Student2Subject322BAD
Student2Subject433BAD
Student2Subject545BAD
Student3Subject175GOOD
Student3Subject280GOOD
Student3Subject355GOOD
Student3Subject484GOOD
Student3Subject565GOOD

How can I achieve using DAX Calculated column (not a measure) ?

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

3 REPLIES 3
anmolmalviya05
Super User
Super User

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.

burakkaragoz
Community Champion
Community Champion

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.

Ahmedx
Super User
Super User

pls try

Screenshot_1.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.