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