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
Anonymous
Not applicable

ALL function doesn't delete filter

Hello everyone!
I have very simple table 'Result' wich has columns Date_open, Date_close and Id.
I use two filters in dashboard: Date_open and Date_close
I want to create table with 2 columns:
1. Count Id with both filters: Date_close and Date_open
2. Count Id with one filters: Date_open

I have tried this code, which has to count id without filter on Date_close, but it doesn't work(( probably I don't understand ALL function correctly


CALCULATE (COUNT(result[id]), ALL(result[Date_close]))

 

1 ACCEPTED SOLUTION
daxer-almighty
Solution Sage
Solution Sage

NEVER use a single-table models. NEVER. They work counterintuitively and many a time will return wrong numbers without you even knowing it. Always use a proper star schema. ALWAYS.

 

Ignoring the above will result in you creating completely unreliable models that will calculate things you won't even be able to explain.

 

Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

 

If you want to know what can happen if you don't follow the advice, here's an example: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Why-one-table-models-will-produce-WRONG-NUMBE...

 

View solution in original post

2 REPLIES 2
daxer-almighty
Solution Sage
Solution Sage

NEVER use a single-table models. NEVER. They work counterintuitively and many a time will return wrong numbers without you even knowing it. Always use a proper star schema. ALWAYS.

 

Ignoring the above will result in you creating completely unreliable models that will calculate things you won't even be able to explain.

 

Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

 

If you want to know what can happen if you don't follow the advice, here's an example: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Why-one-table-models-will-produce-WRONG-NUMBE...

 

MattAllington
Community Champion
Community Champion

You shouldn't attempt these types of formulas without a Star Schema. Create lookup tables for both date columns and use those in your formulas and visuals. https://exceleratorbi.com.au/the-optimal-shape-for-power-pivot-data/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

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.