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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Context in dax measure

Hello to all,

I have a problem with my filter. When I filter on a category, I should have only three people concerned. It works well if in my table I use their own fields. The problem is that when I add fields calculated from measurements in my table, the context of the filter disappears.

In the picture, the top table shows the expected result. It works because I did not add my measure. When I add my measure, the filter by category does not work anymore. I imagine that the ALLEXCEPT function can help me but I can't place it in my measure.

1 Cumulative Buyer/Appro STD = if(CALCULATE([Number of purchases],FILTER('NOHA PURCHASES','NOHA PURCHASES'[Buyer (order)]="X"), FILTER('NOHA CFO','NOHA CFO'[Approval WF Standard]="X"))>=1, "CUMULARITY DECREASED", "CLEAR")

If someone knows how to help me I thank him/her greatly.

 

 

image.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 
You can add the Allexcept() function in the bold part but you should use Filter(All(table), [Category]=MAX([Category]). So try:

 

1 Cumulative Buyer/Appro STD = if(CALCULATE([Number of purchases],FILTER('NOHA PURCHASES','NOHA PURCHASES'[Buyer (order)]="X"), FILTER('NOHA CFO','NOHA CFO'[Approval WF Standard]="X"), Filter(All('Tablename'),[Category]=MAX([Category])))>=1, "CUMULARITY DECREASED", "CLEAR")

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 
You can add the Allexcept() function in the bold part but you should use Filter(All(table), [Category]=MAX([Category]). So try:

 

1 Cumulative Buyer/Appro STD = if(CALCULATE([Number of purchases],FILTER('NOHA PURCHASES','NOHA PURCHASES'[Buyer (order)]="X"), FILTER('NOHA CFO','NOHA CFO'[Approval WF Standard]="X"), Filter(All('Tablename'),[Category]=MAX([Category])))>=1, "CUMULARITY DECREASED", "CLEAR")

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Did you see that they simplified the behavior of the CALCULATE() command for scenarios like yours?

 

Specifying multiple filter conditions in CALCULATE - SQLBI

Helpful resources

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

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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