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

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