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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
SarathB2
Frequent Visitor

Need help on DAX

Hello Experts,

I have a table and having one calculated column with Pass/Fail.

I want output like if all pass for one category then consider as pass and even one fail occur for that category then consider as fail.

 

something like

 MaterialInspCheck Output 
 AODTRUE TRUE 
 ADISTTRUE TRUE 
 AROUNDTRUE TRUE 
 ASFOTRUE TRUE 
       
 BODTRUE FALSE 
 BDISTFALSE FALSE 
 BROUNDTRUE FALSE 
       
 CSFOFALSE FALSE 
 CODFALSE FALSE 
 CDISTFALSE FALSE 
 CROUNDFALSE FALSE 
       

 

Please assist,

Thanks in advance.

 

Regards,

Sarath.

 

 

2 ACCEPTED SOLUTIONS
AlexisOlson
Super User
Super User

 Check that the Material has no false value in its group.

 

Output =
NOT (
    FALSE
        IN CALCULATETABLE (
            VALUES ( Materials[Check] ),
            ALLEXCEPT ( Materials, Materials[Material] )
        )
)

 

Slightly less intuitive but simpler:

Output =
CALCULATE (
    SELECTEDVALUE ( Materials[Check] ),
    ALLEXCEPT ( Materials, Materials[Material] )
)

View solution in original post

Yes, the second one will return blanks when multiple values are present. These get coerced into FALSE values if the column type is a logical boolean.

 

To work with "Yes" / "No", I think you could just add an argument to SELECTVALUE for what to return instead of blank when there are multiple values. That is, SELECTEDVALUE ( Materials[Check], "No" ).

View solution in original post

5 REPLIES 5
AlexisOlson
Super User
Super User

 Check that the Material has no false value in its group.

 

Output =
NOT (
    FALSE
        IN CALCULATETABLE (
            VALUES ( Materials[Check] ),
            ALLEXCEPT ( Materials, Materials[Material] )
        )
)

 

Slightly less intuitive but simpler:

Output =
CALCULATE (
    SELECTEDVALUE ( Materials[Check] ),
    ALLEXCEPT ( Materials, Materials[Material] )
)

Hi @AlexisOlson ,
In case of something like "YES" or "NO" instead of "True" or "False" , first solution is working and Second solution is not giving expected result... Right?

 

Thanks & Regards,

Sarath.

Yes, the second one will return blanks when multiple values are present. These get coerced into FALSE values if the column type is a logical boolean.

 

To work with "Yes" / "No", I think you could just add an argument to SELECTVALUE for what to return instead of blank when there are multiple values. That is, SELECTEDVALUE ( Materials[Check], "No" ).

Okay , Super thanks for your response @AlexisOlson . 

Thanks a lot @AlexisOlson . Great solution.It's working, I will check it in my real scenorio.
Greatful for quick response.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.