Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello.
I have a ticket table, which lists all the tickets we have, with columns such as closed date, opened date, state
I need to be able to calcuate the duration of each ticket as a colum in my table.
At the moment, i have closed at - opened at which gives me the duration... But this does not account for tickets that are not closed.
I need to have one column which does the following : If the ticket is closed, do closed at - opened at else if it the ticket is open, do TodaysDate - opened at.
Solved! Go to Solution.
@PPStar try below
Duration =
IF (
NOT ISBLANK('Ticket'[Closed Date]),
'Ticket'[Closed Date] - 'Ticket'[Opened Date],
TODAY() - 'Ticket'[Opened Date]
)
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
Hi @PPStar ,
Have you solved your problem? If it's solved, you can mark the correct answer, if not, provide more detailed information and we can help you better!
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@PPStar try below
Duration =
IF (
NOT ISBLANK('Ticket'[Closed Date]),
'Ticket'[Closed Date] - 'Ticket'[Opened Date],
TODAY() - 'Ticket'[Opened Date]
)
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
@PPStar , I think it better to have table calculating Active tickets, as given file, for Active/Current employees
If ([States] = closed then [closed_at]-[opened_at] else DateTime.LocalNow - [opened_at])
I have that above formula, but i keep getting a syntax error.
note, closed at and opened at are just date column (not time). Could that be the issue
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
88 | |
82 | |
65 | |
64 | |
58 |
User | Count |
---|---|
171 | |
113 | |
110 | |
73 | |
73 |