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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
nhmpp
Helper I
Helper I

Filters not applying

Hello,

 

I am using this measure: 

 

CALCULATE(Parameter[Parameter Value]*DISTINCTCOUNT(Query1[order_number_id]), FILTER(Query1, Query1[product_type] = "Subscriptions"), FILTER(ALL('Date Table'[Weekday]), 'Date Table'[Weekday] IN {"Monday","Tuesday","Wednesday","Thursday","Friday"}), FILTER(ALL('Time Table'[Time]), 'Time Table'[Time] >= TIME(9,0,0) && 'Time Table'[Time] <= TIME(15,0,0)))

 

 

And the second and third filters are not doing what is expected. Basically the calculation is being applied to this entire matrix, rather than just Monday-Friday from 9am to 5pm. The first filter is working fine. 

 

 nhmpp_0-1668791752597.png

 

Date Table[Weekday] makes up the columns, and Time Table[Time] makes up the rows, so I am not sure what is going wrong here. I have also tried this measure with the same results:

 

CALCULATE(Parameter[Parameter Value]*DISTINCTCOUNT(Query1[order_number_id]), FILTER(Query1, Query1[product_type] = "Subscriptions"), FILTER('Date Table', 'Date Table'[Weekday] IN {"Monday","Tuesday","Wednesday","Thursday","Friday"}), FILTER('Time Table', 'Time Table'[Time] >= TIME(9,0,0) && 'Time Table'[Time] <= TIME(15,0,0)))

 

 

I am at a loss as to why only the second and third measures are not applying! Any help is appreciated!

1 ACCEPTED SOLUTION
nhmpp
Helper I
Helper I

I actually solved this myself after posting using this measure instead:

 

IF(MAX('Date Table'[Weekday]) IN {"Monday","Tuesday","Wednesday","Thursday","Friday"} && MAX('Time Table'[Time]) >= TIME(9,0,0) && MAX('Time Table'[Time]) <= TIME(15,0,0), CALCULATE(Parameter[Parameter Value]*DISTINCTCOUNT(Query1[order_number_id]), FILTER(Query1, Query1[product_type] = "Subscriptions")) , 0)

View solution in original post

1 REPLY 1
nhmpp
Helper I
Helper I

I actually solved this myself after posting using this measure instead:

 

IF(MAX('Date Table'[Weekday]) IN {"Monday","Tuesday","Wednesday","Thursday","Friday"} && MAX('Time Table'[Time]) >= TIME(9,0,0) && MAX('Time Table'[Time]) <= TIME(15,0,0), CALCULATE(Parameter[Parameter Value]*DISTINCTCOUNT(Query1[order_number_id]), FILTER(Query1, Query1[product_type] = "Subscriptions")) , 0)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.