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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
dandywong
Frequent Visitor

Creating a new table based on multiple criteria

I am trying to create a new table based on 2 filter criteria:

 

1) The ScopeStatus has to = Green

2) ProjectPhase has to = Completed

 

If the 2 criteria are not met, then it will not show up on the new table. Any help is greatly appreciated! Thanks!

Image of Tables.PNG

1 ACCEPTED SOLUTION

Hi @dandywong,


Your parentesis are misplaced so the all function is.working incorrectly.

The measure should be

Test Table =
FILTER (
    ALL (
        Projects[ProjectIdentifier],
        Projects[ProjectPhase],
        Projects[EnterpriseProjectTypeDescription],
        Projects[ScopeStatus]
    ),
    Projects[ProjectPhase] = "Completed"
        && Projects[ScopeStatus] = "Green"
)



I also notice that you were missing the Project ScopeStatus on your ALL formula without it the filter wouldn't had context and the result would be incorrect.

Regards
MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

6 REPLIES 6
MFelix
Super User
Super User

Hi @dandywong,

 

If you are on the query Editor you just need to Reference the query to the initial one and then add a filter on the columns you need.

 

On dax add a new table with the following code:

Table =
FILTER (
    ALL ( Projects[Project1]; Projects[ProjectPhase]; Projects[ScopeStatus] );
    Projects[ProjectPhase] = "Completed"
        && Projects[ScopeStatus] = "Green"
)

On the ALL sintax add all the columns you want to pass to the new column from the previous one.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi there,

 

I tried this formula, but it didn't work:

 

Error.PNG

 

Any idea on how to fix this?

Hi @dandywong,

 

You need to take out the comma after "Green". The && cannot be preceded by a comma.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks MFelix!!!!

 

Sorry, I think I'm missing something....

 

Error 2.PNG

 

Still getting an error.

Hi @dandywong,


Your parentesis are misplaced so the all function is.working incorrectly.

The measure should be

Test Table =
FILTER (
    ALL (
        Projects[ProjectIdentifier],
        Projects[ProjectPhase],
        Projects[EnterpriseProjectTypeDescription],
        Projects[ScopeStatus]
    ),
    Projects[ProjectPhase] = "Completed"
        && Projects[ScopeStatus] = "Green"
)



I also notice that you were missing the Project ScopeStatus on your ALL formula without it the filter wouldn't had context and the result would be incorrect.

Regards
MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you MFelix! That did the trick!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.