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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
Super User
Super User

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
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.