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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Filtering from multiple date ranges (Can any one tell me is this is the correct approach)

I have 3 slicers to 

roopesh_0-1595993439616.png

 

that query's status date Daterange1 or Datarange3 or Daterange3

roopesh_1-1595993481944.png

created three tables for the dates

roopesh_2-1595993551699.png

DateRange1 = SUMMARIZECOLUMNS(vw_patientListNew[StatusDate].[Date])
DateRange2 = SUMMARIZECOLUMNS(vw_patientListNew[StatusDate].[Date])
DateRange3 = SUMMARIZECOLUMNS(vw_patientListNew[StatusDate].[Date])

created datefinterrange collumn 

roopesh_3-1595993659486.png

DateFilterRange = 
IF(
    
    
    MAX(vw_patientListNew[StatusDate])>=[MinselectedDateRange1] && MAX(vw_patientListNew[StatusDate])<=[MaxselectedDateRange1] ||
    MAX(vw_patientListNew[StatusDate])>=[MinselectedDateRange2] && MAX(vw_patientListNew[StatusDate])<=[MaxselectedDateRange2] ||
    MAX(vw_patientListNew[StatusDate])>=[MinselectedDateRange3] && MAX(vw_patientListNew[StatusDate])<=[MaxselectedDateRange3] 

,1,Blank())

 and adding 

roopesh_4-1595993796622.png

to restrict the table filter.

 

I am not getting the desired results. Can anyone let me know the issue? Thanks

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , refer if this can help

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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

@amitchandak , @AntrikshSharma I removed the measure in a calculated field and it's still not working

roopesh_0-1596025808604.png

roopesh_1-1596025861582.png

 

TimeFrameDateRangeCol1 = 
IF(MAX(vw_patientListNew[StatusDate]) in VALUES(DateRange1[Date]),1)

 

Are you trying to obtain all the dates that are included within those 3 slicers?
AntrikshSharma
Super User
Super User

What is your desired result?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.