xl2016 - median time per process step in powerpivot (datamodel) with timestamps in rows

ryanlauder

New Member
Joined
Mar 20, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
HI There

I have a power pivot (also in powerquery) table ProcessData that includes 3 columns:
UniqueItemRef; Status; Update (=datetimestamp)

If an item has passed through several statuses it will have several rows for those statuses (same UniqueItemRef and Status on each row)
Also, if certain updates were made while within status, the updated timestamp changes, giving also several rows
Therefore there can be several rows for each combination of UniqueItemRef-status-Update

I want to measure the duration in each status for each ticket i.e. for each UniqueItemRef-status, get the Min(Updated) VS max(updated)
Further - I then want to get the Median for the duration of any UniqueItemRef in each status. (and possibly percentile calcs in the same way)

So for example:
if 3 UniqueItemRefs A01,B01,C02 had status=InProgress for 1day, 3days, 5days respectively,
AND if the same UniqueItemRefs had then got status =Hold for 3days,4days,5days respectively…

the Median for inProgress should return 3
the Median for Hold should return 4


I am new to DAX formula so any help is appreciated thanks


sample layout
Book1
ABC
1UniqueItemRefStatusUpdate (dd/mm/yyyy)
2A01new01/12/2022
3B01inprogress02/12/2022
4C02on hold03/12/2022
5A01new04/12/2022
6B01inprogress05/12/2022
7C02on hold06/12/2022
8A01inprogress07/12/2022
9B01inprogress08/12/2022
10C02on hold09/12/2022
11A01on hold10/12/2022
12B01inprogress11/12/2022
13C02on hold12/12/2022
14A01new13/12/2022
15B01inprogress14/12/2022
16C02on hold15/12/2022
Sheet1
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,215,007
Messages
6,122,670
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top