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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
I need to dynamically calculate the median of the last three months of the starting time of the distinct jobs of the current selected date, that is:
I want to calculate, for each distinct job key, the median of its "Start" time of the last three months.
I tried:
Could someone help me out?
Thanks in advance for your help.
BR,
Sara
Hi @scaballerom ,
You can try this measure:
MEASURE =
CALCULATE (
PERCENTILE.EXC ( 'Fact Jobs'[job_start_time], 0.5 ),
FILTER (
ALL ( 'Fact Jobs' ),
'Fact Jobs'[job_key] = SELECTEDVALUE ( 'Fact Jobs'[job_key] )
&& 'Fact Jobs'[job_start_datetime] <= MaxDay
&& 'Fact Jobs'[job_start_datetime] > MinDay
)
)
If that's not what you need, provide sample files and expected output.
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-jialluo-msft ,
I get the following error:
Please find bellow some sample data, as the expected results:
| job_name | job_starting_time_adj | job_status | job_starting_datetime_adj | |||
| 1 | 18:00:01 | Completed | 15/09/2022 18:00 | |||
| 1 | 18:00:09 | Completed | 18/09/2022 18:00 | Median | 18:00:09 | |
| 1 | 18:00:01 | Completed | 19/09/2022 18:00 | Average | 18:00:08 | |
| 1 | 18:00:01 | Completed | 20/09/2022 18:00 | |||
| 1 | 18:00:07 | Completed | 21/09/2022 18:00 | |||
| 1 | 18:00:09 | Completed | 22/09/2022 18:00 | |||
| 1 | 18:00:14 | Completed | 25/09/2022 18:00 | |||
| 1 | 18:00:12 | Completed | 26/09/2022 18:00 | |||
| 1 | 18:00:03 | Completed | 27/09/2022 18:00 | |||
| 1 | 18:00:13 | Completed | 28/09/2022 18:00 | |||
| 1 | 18:00:18 | Completed | 29/09/2022 18:00 | |||
| 1 | 18:00:07 | Completed | 02/10/2022 18:00 | |||
| 1 | 18:00:15 | Completed | 03/10/2022 18:00 |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |