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
Anonymous
Not applicable

Set Limit of Future Appointment within 1 Month

I have a measure that I need to grab all available doctors appointments for the next 1 month, 3 months, 6 months respcectively.

My issue is I cant get my measure to limit to appointments captured within 1 month.

 

When I run this measure:

Upcoming Appointments - 1 month = 
CALCULATE(
AVERAGE('Table'[Days From Booking to Appointment]),
DATESBETWEEN(
'Appointment Times with date'[Date],
TODAY(),
MONTH(TODAY())+1
)
)
 
However this only grabs every appointment date from today onwards, is there a way to limit this particular measure to only grab dates from TODAY( ) & <= TODAY( ) +1 MONTH?
 
1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can use DATESINPERIOD() function to calculate period value like this:

Upcoming Appointments -1 month = 
CALCULATE (
    AVERAGE ( 'Table'[Value] ),
    DATESINPERIOD ( 'Calendar'[Date], TODAY (), 1, MONTH )
)

Upcoming Appointments -3 month = 
CALCULATE (
    AVERAGE ( 'Table'[Value] ),
    DATESINPERIOD ( 'Calendar'[Date], TODAY (), 3, MONTH )
)

Upcoming Appointments -6 month = 
CALCULATE (
    AVERAGE ( 'Table'[Value] ),
    DATESINPERIOD ( 'Calendar'[Date], TODAY (), 6, MONTH )
)

vyingjl_0-1632451112569.png

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can use DATESINPERIOD() function to calculate period value like this:

Upcoming Appointments -1 month = 
CALCULATE (
    AVERAGE ( 'Table'[Value] ),
    DATESINPERIOD ( 'Calendar'[Date], TODAY (), 1, MONTH )
)

Upcoming Appointments -3 month = 
CALCULATE (
    AVERAGE ( 'Table'[Value] ),
    DATESINPERIOD ( 'Calendar'[Date], TODAY (), 3, MONTH )
)

Upcoming Appointments -6 month = 
CALCULATE (
    AVERAGE ( 'Table'[Value] ),
    DATESINPERIOD ( 'Calendar'[Date], TODAY (), 6, MONTH )
)

vyingjl_0-1632451112569.png

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Try measure like

 

Upcoming Appointments - 1 month =
var _1 = today()
var _2 = date(year(_1) , Month(_1)+1, day(_1))
return
CALCULATE(
AVERAGE('Table'[Days From Booking to Appointment]),
DATESBETWEEN(
'Appointment Times with date'[Date],
_1,
_2
)
)

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

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.