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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Urgent! please help. This multi-condition DAX formula is not working correctly

I am trying to do the following:  I want all associated "AcctNumbers" to  SAY "REMOVE", if the columns 4A, 4B, 5A and 5B, ALL read "Complete" in any of the rows associated with that "Acc Number" group. If any of those rows at all, but any of those rows associated with that "AcctNumber", then it should say "REMOVE" ELSE "KEEP"  for example below, this should say "KEEP" because NOT all the the columns associated in the group of AcctNumbers; 4A, 4B, 5A and 5B DO NOT say Complete

bjackson2760_0-1706111483777.png

and...this should say "REMOVE" because all for categorys of 4A, 4B, 5A and 5B, have "COMPLETE" in the AcctNumber field in the group

bjackson2760_1-1706111774305.png

 

Any assistance would be so appreciated!

3 REPLIES 3
talespin
Solution Sage
Solution Sage

Hi @Anonymous ,

 

One way to accomplish this is below.

I am considering both Number and Machine ID, Final Status is for this combination, you can remove Machine ID from measure, if you want status by Number only. Please replace tables/columns in measure with yours.

 

talespin_0-1706159719148.png

 

Measure

Final Status =
VAR _Status4A = CALCULATE( MIN(Machine[4AStatus]), REMOVEFILTERS(Machine), SUMMARIZE(Machine, Machine[Number], Machine[MachineID]))
VAR _Status4B = CALCULATE( MIN(Machine[4BStatus]), REMOVEFILTERS(Machine), SUMMARIZE(Machine, Machine[Number], Machine[MachineID]))
VAR _Status5A = CALCULATE( MIN(Machine[5AStatus]), REMOVEFILTERS(Machine), SUMMARIZE(Machine, Machine[Number], Machine[MachineID]))
VAR _Status5B = CALCULATE( MIN(Machine[5BStatus]), REMOVEFILTERS(Machine), SUMMARIZE(Machine, Machine[Number], Machine[MachineID]))

RETURN IF(_Status4A = "Complete" && _Status4B = "Complete" && _Status5A = "Complete" && _Status5B = "Complete", "REMOVE", "KEEP")
lbendlin
Super User
Super User

This is a public forum where users help users.  Try to avoid using words like "urgent".

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Anonymous
Not applicable

Received.  Thank you for the tip.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.