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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

DAX Formula for column not working

Hello all,

I have a problem with a DAX column.  The issue is that it is bringing in the unwanted results.  Here is an example:  If the Number which is an "AccountNumber" is the same within the group and the columns 4A, 4B, 5A and 5B say ANYTHING other than "Complete" than it should say "KEEP"  else "REMOVE.  Because the below table has "Complete" and the field "Numbers are all the same, it should say "REMOVE.

With my initial DAX formula, I see that it is not correct, see below examples.  Any assistance you can provide, I would greatly appreciate.  Thank you in advance!  🙂

 

bjackson2760_0-1706219093653.png

Aother example:

 

bjackson2760_1-1706219919615.png

 

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

You can try formula like below:

NewColumn = 
IF(
    COUNTROWS(FILTER(YourTable, 
        YourTable[nber] = EARLIER(YourTable[nber]) &&
        (
            YourTable[4A Status] <> "Complete" ||
            YourTable[4B Status] <> "Complete" ||
            YourTable[5A Status] <> "Complete" ||
            YourTable[5B Status] <> "Complete"
        )
    )) > 0,
    "KEEP",
    "REMOVE"
)

vkongfanfmsft_0-1706237539105.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

hello v-Kongfanf-msft,

Thank you, but that didn't work.  It yielded the following results.  It says "KEEP", but it should say "REMOVE" because within that group of Numbers which is an Account Number, they say "Complete" across the rows of 4A, 4B, 5A, and 5B.

bjackson2760_0-1706279792962.png

 

Anonymous
Not applicable

Hi @Anonymous ,

 

Pls provide test data and detail desire result.

 

Best Regards,
Adamk Kong

Anonymous
Not applicable

Hi v-kongfanf,

Here is some test data:  This data is coming from a report that has counted the number of "Completes per Acct#.  It seems like whatever DAX I create wants to count from the original report.  I just need to formula to affect the current table not the detail table...
Now, what I need is the DAX that says if any of the numbers across this table have a zero there, then "KEEP", "REMOVE".  Simple enought right.  NO, not for me...its been very hard to make this happen.  If you can assist with this I would be most grateful!  🙂

AcctSum of 4A Cass CTSum of 4B Cass CTSum of 5A Cass CTSum of 5B Cass CTKEEP OR REMOVE
12348877REMOVE
15261111REMOVE
65231011KEEP
85982222REMOVE
99883122REMOVE

Helpful resources

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

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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