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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Apply Two Date Filters to a Table Visual

Hi,

 

I am looking for some help where i would like to apply 2 date filters on a table visual. I would like the results in the table to be filtered if:-

 

Design Date is >= 01 Jan 2022 and <= 31 Jan 2022    OR

Date Ordered >= 01 Jan 2022 and <= 31 Jan 2022

 

At the minute the filter is filtering the visual where both dates meet the criteria above. I would like this to be filtered if either dates filters are met.

 

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a new measure. Only measure can use slicer value. Calculated column can not use the same

 

//Date1 is independent Date table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = Minx(allselected(Date1),Date1[Date])
Var _cnt =
countrows(filter( 'Table', ( 'Table'[Design Date] >=_min && 'Table'[Design Date] <=_max) || ( 'Table'[Ordered Date] >=_min && 'Table'[Ordered Date] <=_max) ) )

 

return

if(isblank(_cnt) , "No", "Yes")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Try a new measure. Only measure can use slicer value. Calculated column can not use the same

 

//Date1 is independent Date table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = Minx(allselected(Date1),Date1[Date])
Var _cnt =
countrows(filter( 'Table', ( 'Table'[Design Date] >=_min && 'Table'[Design Date] <=_max) || ( 'Table'[Ordered Date] >=_min && 'Table'[Ordered Date] <=_max) ) )

 

return

if(isblank(_cnt) , "No", "Yes")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@Anonymous , Create an independent date table , do not join or have all joins as inactive. Use slicer from Independent date table

 

then create measure like

//Date1 is independent Date table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = Minx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Table', ( 'Table'[Design Date] >=_min && 'Table'[Design  Date] <=_max) || ( 'Table'[Ordered Date] >=_min && 'Table'[Ordered Date] <=_max) ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks for your help. On the return i dont need to SUM any values, id rather just have a return a Yes/No should the dates filters meet the criteria set. Then i can apply the measure as a visual filter where it equal 1 or Yes.

 

Is there a way to do this rather than a sum?

 

Thanks

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.