Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
)
)
Solved! Go to Solution.
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 )
)
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.
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 )
)
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.
@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
)
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |