Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello there,
I need to have a hint on how to write a measure within a call center analysis , that counts number of Callid's but only for calls meeting some criteria. One of the criteria is that the duration in hh:mm:ss has to be below a defined value. the other one is wether the call had been taken by callcenter agent (cca) or was lost due to inactivity of the cca.
Lost Calls <5seconds = calculate(count(Calls[CallId]), Calls[Callstatus]="Lost", Calls[CallDuration]< 00:00:05 ).
I do not see how to phrase the second filter 'Calls[CallDuration]< 00:00:05'.
Any hint or help is appreciated.
thx & brgds
Thomas
Solved! Go to Solution.
Hi,
If you have date time format for start and end you can use datediff.
E.g. modified from my last example:
Dax:
Proud to be a Super User!
Hi Valtteri,
thx for your answer.
I understood your approach to extract only the seconds from the given Value of time. I did not consider that one
But actually I am not quite confident enough on what the data format has to be for the column holding the time consumption.
What data format is needed for that difference (consumption-column) to get your approach implemented?
Does it have to be DateTime or Time or Duration?
Help is appreciated.
thx
Thomas
Hi,
If you have date time format for start and end you can use datediff.
E.g. modified from my last example:
Dax:
Proud to be a Super User!
Good Morning Valtteri,
I figured out that using your approach will return not only the ones with a time less or equal to 00:00:05, but on top those with e.g. 00:04:05 as well.
So basically your approach was the right hint. I needed to check the raw data to see what was included. By that I figured out that all time with Seconds <=5 had been used, not only thos lasting just only 5 s.
The correct definition is now:
LostCallsBelow5s =
calculate(
count(table[callid]),
table[Callstatus]="lost",
second(table[duration])<=5,
minute(table[duration])=5,
hour(table[duration])=0
)
Your approach to the solution is accepted, thank you very much.
Thomas
Hi,
Here is one way to do this:
Data:
Here two out of four rows have values that fullfill both conditions.
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
8 |