Formatting Time and doing further calculations

Hello. I have a column “Hold Time”. This Column Originally Displayed time as for example 0.00:00:07

I Transformed it to Total Minutes and it gave me a column “Hold Minutes” showing above time as 0.116666667

I used this to Create a Measure “Average Hold Minutes” and it worked fine.

Since this Hold time is also Same as time taken to answer a call, I Now need to calculate Number of calls & % of calls that were answered in less than 60 seconds and Those that were answered in less than 30 seconds.

I can do this by creating another column Converting “HoldTime” to Seconds and creating these measures,

Is there a better way to handle this ? a Smart way ? so I can avoid creating this new Column

Hi @jps, I noticed you didn’t provide a PBIX file. Providing one will help users and experts find a solution to your inquiry faster and better.

A perfect initial question includes all of the following:

  • A clear explanation of the problem you are experiencing

  • A mockup of the results you want to achieve

  • Your current work-in-progress PBIX file

  • Your underlying data file (to allow us to go into Power Query if necessary to transform your data and/or data model – often DAX questions really end up being data modeling solutions)

Check out this thread on Tools and Techniques for Providing PBIX Files with Your Forum Questions

Not completing your data may sometimes cause delay in getting an answer.

Hi @jps,

You can leverage the Hold Minutes column for that as well. Just create a small supporting table

Seconds Minutes
30 0,5
60 1

and measures like:

# of calls in less than = 
COUNTROWS( 
    FILTER( 
        Hold, 
        Hold[Hold Minutes] <= MAX( 'Duration'[Minutes] )
    )
)

a percentage would be something like

% of calls in less than =
VAR _TotalRows = COUNTROWS( ALLSELECTED( Hold ))
RETURN

DIVIDE( [# of calls in less than], _TotalRows )

.
image

I hope this is helpful

3 Likes

Hi @jps, good to see you are having progress in your inquiry.

Did the response provided by @Melissa help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query. Thanks!

Thank You Melissa

That had got me exactly what i was looking for. :slight_smile:

Appreciate your support