Forum Discussion
waiting time display
hiii
i have applied this formula for wait time
8 Replies
- Fowmy
Super User
Anonymous
To get the total in SECONDS try this as a new column in your table:wait time = VAR S = ('Q2 Call Answering'[Disconnect Time] - 'Q2 Call Answering'[Connect Time] - 'Q2 Call Answering'[Hold Duration] - 'Q2 Call Answering'[Talk Duration]) RETURN S * 86400________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
- amitchandak
Super User
Anonymous , Try like
new column =
var _1 = (('Q2 Call Answering'[Disconnect Time] - 'Q2 Call Answering'[Connect Time]) - 'Q2 Call Answering'[Hold Duration] - 'Q2 Call Answering'[Talk Duration])
return
Minute( _1)*60 + SECOND( _1)If needed add code for hour
- AnonymousNot applicable
hiii i tried applying ur code its been excuted succeesfully but i am get the same output
- Fowmy
Super User
- Greg_Deckler
Community Champion
Anonymous I'm not entirely sure what you are going for here. Can you post the data as text and what you expect to get as a result?
Please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2. - FrankAT
Community Champion
Hi Anonymous ,
use the following formula:
Wait Time = 'Q2 Call Answering'[Disconnect Time] - 'Q2 Call Answering'[Connect Time] - 'Q2 Call Answering'[Hold Duration] - 'Q2 Call Answering'[Talk Duration]and format the column data as marked (see figure):
Regards FrankAT
- AnonymousNot applicable
hiii frank
i tried applying ur query its not displaying the in secs i think there a problem in out format can you help me plz
- dax
Community Support
Hi Anonymous ,
You could calculate this in M code like below
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("RcuxEQAgCEPRXagtApomq3jsv4aoBXcpfvGyt3loUg4b5lDgJ0ThBfRmOcpSLBDXUqtubNJZIPMA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [disconnect = _t, connect = _t, hold = _t, duration = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"disconnect", type duration}, {"connect", type duration}, {"hold", type duration}, {"duration", type duration}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [disconnect]-[connect]-[hold]-[duration]), #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type duration}}), #"Added Custom1" = Table.AddColumn(#"Changed Type1", "Custom.1", each Duration.TotalSeconds([Custom])) in #"Added Custom1"Then change data format like below
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.