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

Remove filter using ALL/REMOVEFILTERS from related tables: How exactly?

Hi folks,

 

I am having a seemingly trival problem. I have the following very simple star schema:

 

aabtra_0-1674808877933.png

 

There are a 1-* relationship between the [Product] columns from the dimension tables to the fact table.

 

Now I would like to create a measure that counts the rows in the SalesStatistics table but ignores certain visual and slicer filters:

  • suppliers[Supplier] should be ignored
  • SalesStatistics[SalesDate] should be ignored
  • warehouses[location] should not be ignored

Obviously,

 

 

Orderlines = 
	CALCULATE(
		COUNTROWS(SalesStatistics),
		ALL(SalesStatistics[SalesDate],suppliers[Supplier])
	)

 

 

does not work because "All column arguments of the ALL/ALLNOBLANKROW/ALLSELECTED/REMOVEFILTERS function must be from the same table."

 

What am I missing here? The columns should all be in the expanded table of SalesStatistics so why is this not trivial?

 

Kind regards, aabtra

 

 

 

 

2 REPLIES 2
johnt75
Super User
Super User

You have to remove the filters from different tables in separate steps. try

Orderlines =
CALCULATE (
    COUNTROWS ( SalesStatistics ),
    REMOVEFILTERS ( SalesStatistics[SalesDate] ),
    REMOVEFILTERS ( suppliers[Supplier] )
)
Anonymous
Not applicable

Did you try that? I am getting the exact same error.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.