Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
)
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
90 | |
82 | |
62 | |
61 | |
58 |
User | Count |
---|---|
159 | |
114 | |
100 | |
75 | |
65 |