Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
21 | |
14 | |
14 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |