Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Probably not that difficult but still I am strugling.
Here is the issue:
I want to make a measure that shows me how many time each step took.
So second line would be 7:34 -/- 7:32 resulting in 2 minutes.
Etc.
Thanks @Greg_Deckler bit more difficult then I was expecting.
Tried it like this but no luck yet :
@rpinxt Can you post your data as text?
@Greg_Deckler you mean like this?
| Date | Name | Time | Process |
| 01-02-24 | ALHAJJX | 07:32:47 | Sumtotal |
| 01-02-24 | ALHAJJX | 07:34:54 | Apply |
| 01-02-24 | ALHAJJX | 10:32:36 | Pauze Uit |
| 01-02-24 | ALHAJJX | 10:51:13 | Pauze Uit |
| 01-02-24 | ALHAJJX | 11:24:17 | Apply |
| 01-02-24 | ALHAJJX | 12:30:54 | Pauze In |
| 01-02-24 | ALHAJJX | 13:05:07 | Pauze Uit |
| 01-02-24 | ALHAJJX | 15:01:02 | Pauze In |
| 01-02-24 | ALHAJJX | 15:19:09 | Pauze Uit |
| 01-02-24 | ALHAJJX | 15:36:23 | Apply |
| 01-02-24 | ALHAJJX | 15:57:11 | Stop |
@rpinxt Perfect! Try this (PBIX is attached below signature)
Time Spent (Minutes) =
VAR __Current = [Time]
VAR __Previous = MAXX(FILTER('Table 1','Table 1'[Time] < __Current),[Time])
VAR __Result = IF( __Previous = BLANK(), 0, ( __Current - __Previous ) * 1. * 24 * 60)
RETURN
__Result
Thanks very much Greg.
First thought you made a measure but this is calculated column correct?
Works like a charm.
But I have a new concern now....
Out columns have a different order, I set that order in a table visual.
I tried changing the columns in the query editor but the original order remains in the table view in Power BI.
Is there another solution to change the order of the columns then change it in the source?
@rpinxt See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |