- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate TimeInStatus
Hi,
I retrieve data from my JIRA projects in PowerBI via the REST API services that JIRA provides.
On each ticket, I retrieve the history of the actions that took place, including status changes. For this case (status changes), I know the original status (Change.fromString), the final status (Change.toString) and the datetime of the status change.
So, the data is looks like this:
From these data, I try to know the time spent in "Demande imprécise" status.
For example, if I consider the "11419" ID ticket, here are the periods of time in "Demande imprécise" status and the duration :
- 03/05/18 5:06 PM - 03/05/18 5:06 PM ==> 14 s
- 03/05/18 5:34 PM - 03/05/18 5:37 PM ==> 3 m
- 03/05/18 5:38 PM - 03/05/18 5:40 PM ==> 2 m
Total: 5 m 14 s
I am a little lost to make theses operations, have you already realized that? If yes, how?
Tahnks in advance.
Best regards,
Anthony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you share how you obtained this data from Jira? I'm struggling with getting this data at the minute 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i'm looking for this request. How do have make to retrieve the history of the actions, including status changes exactly like your screenshot ?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @aaumond
date ship down = CALCULATE ( MAX ( [Change date] ), FILTER ( ALL ( Sheet1 ), [Index] = EARLIER ( [Index] ) - 1 && MOD ( [Index], 2 ) = 0 && [ID ticket] = EARLIER ( [ID ticket] ) ) )
second = IF ( DATEDIFF ( [date ship down], [Change date], SECOND ) < 60, DATEDIFF ( [date ship down], [Change date], SECOND ) )
Column = CONCATENATE ( INT ( MOD ( CALCULATE ( SUM ( [second] ), FILTER ( ALL ( Sheet1 ), [ID ticket] = EARLIER ( [ID ticket] ) ) ), 3600 ) / 60 ), "m" ) & CONCATENATE ( INT ( MOD ( MOD ( CALCULATE ( SUM ( [second] ), FILTER ( ALL ( Sheet1 ), [ID ticket] = EARLIER ( [ID ticket] ) ) ), 3600 ), 60 ) ), "s" )
Column 2 = VAR dateshipdown = CALCULATE ( MAX ( [Change date] ), FILTER ( ALL ( Sheet1 ), [Index] = EARLIER ( [Index] ) - 1 && MOD ( [Index], 2 ) = 0 && [ID ticket] = EARLIER ( [ID ticket] ) ) ) VAR second = IF ( DATEDIFF ( [date ship down], [Change date], SECOND ) < 60, DATEDIFF ( [date ship down], [Change date], SECOND ) ) RETURN CONCATENATE ( INT ( MOD ( CALCULATE ( SUM ( [second] ), FILTER ( ALL ( Sheet1 ), [ID ticket] = EARLIER ( [ID ticket] ) ) ), 3600 ) / 60 ), "m" ) & CONCATENATE ( INT ( MOD ( MOD ( CALCULATE ( SUM ( [second] ), FILTER ( ALL ( Sheet1 ), [ID ticket] = EARLIER ( [ID ticket] ) ) ), 3600 ), 60 ) ), "s" )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @v-juanli-msft,
Thanks for your reply.
Do you think it's possible to do this in Power Query rather than DAX ?
Regards,
Anthony

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
02-27-2024 06:49 PM | |||
08-07-2024 12:10 AM | |||
08-27-2024 06:13 AM | |||
08-07-2024 05:10 AM | |||
08-20-2024 09:13 AM |