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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mmh9119
Frequent Visitor

DAX - Exclude a specific filter in a specific column, but keep all others

Hi all,

 

I have the following DAX measure:

 

 

test = CALCULATE(
    COUNTROWS(ma_out_full),
    FILTER(ALL(ma_out_full), ma_out_full[Update Timestamp] = "As of Jul 31, 2023")
    ALLEXCEPT ( ma_out_full, ma_out_full[Transfer Status] = "Case Closed")
    )

 

 

The goal is to filter the table called "ma_out_full" in two ways. One, the rows are only counted where the row value under the "Update Timestamp" column shows "As of Jul 31, 2023". Two, that all values under the "Transfer Status" column are included, except those rows where the value under this column shows "Case Closed". So Basically, count all rows where the time stamp is "As of Jul 31, 2023", and all rows that are NOT marked as "Case Closed".

 

I thought ALLEXCEPT might be the way to go for the second condition, but unfortunately, the above DAX gives a syntax error.

Could someone be kind enough to let me know the correct syntax to make the above DAX work correctly?

Thanks!

1 ACCEPTED SOLUTION

oh my bad instead of , use && 

test = CALCULATE(
    COUNTROWS(ma_out_full),
    FILTER(ALL(ma_out_full), ma_out_full[Update Timestamp] = "As of Jul 31, 2023" && ma_out_full[Transfer Status] <> "Case Closed")
    )

View solution in original post

4 REPLIES 4
eliasayyy
Memorable Member
Memorable Member

 

 

test = CALCULATE(
    COUNTROWS(ma_out_full),
    FILTER(ALL(ma_out_full), ma_out_full[Update Timestamp] = "As of Jul 31, 2023",ma_out_full[Transfer Status] <> "Case Closed")
    )

 


to help you better understand

all means remove filter from all the table
allexcept means remove filter from all the table except a specified column 
allselected means removefilter from all columns selected

 

Thanks annonymous1999 for the prompt reply!

 

Unfortunately, when I tried running your code, I got a message saying "Too many arguments were passed for the FILTER function. The maximum argument count for the function is 2". So I tried adding an extra pair of paranthesis to see if that would fix the issue, but it didn't.

 

Hope this isn't a version issue.

 

Thanks again.

oh my bad instead of , use && 

test = CALCULATE(
    COUNTROWS(ma_out_full),
    FILTER(ALL(ma_out_full), ma_out_full[Update Timestamp] = "As of Jul 31, 2023" && ma_out_full[Transfer Status] <> "Case Closed")
    )

Perfect! That did the trick.

 

Thanks again!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors