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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
qhpowerbi
Helper III
Helper III

Calculated Column value based on other multiple row

Hi all,

 

I have column Project, Section, Result (yellow) as below. How can I get calculated column of " Current Status" (green) in DAX.

The condition example is, If any of the project in section A is Fail, then all current status is fail, else pass.

qhpowerbi_0-1670207693961.png

 

Thank you

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1670211515987.png

 

 

Current status CC =
IF (
    COUNTROWS (
        FILTER (
            Data,
            Data[Project] = EARLIER ( Data[Project] )
                && Data[Result] = "Fail"
        )
    ) > 0,
    "Fail",
    "Pass"
)

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Thennarasu_R
Responsive Resident
Responsive Resident

@qhpowerbi 
Hi,
Try This Formula

Calculated Column=If(
                                      And(Project="A",Result="Fail"),"Fail","Pass")

Thanks,
Thennarasu

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new column.

 

Jihwan_Kim_0-1670211515987.png

 

 

Current status CC =
IF (
    COUNTROWS (
        FILTER (
            Data,
            Data[Project] = EARLIER ( Data[Project] )
                && Data[Result] = "Fail"
        )
    ) > 0,
    "Fail",
    "Pass"
)

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.