Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

Calculate Per hour call rate by caller

Hi All,

Can anyone please help me with creating a measure where I have to caculate number of calls by a caller per hour.
I have the dataset in given below format:

ashishoza12345_1-1644998050132.png

 

 

Let me know if we can create a calculated column where for Example; Based on the data, on 1st Jan John Smith has worked for 4 hours (09:30 am - 1:30 pm) and Paul Clarke has worked for 2.5 hours (9:20 am to 11:50 am) and the calls that were made on that day were 6, then the calls per hours will be 6.5/6=1.08

 

 

Please help!

Thanks in advance!

 

 

 

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @ashishoza12345 ,

 

Split Call Intervall column by delimiter in PowerQuery Editor

vcgaomsft_0-1645181235332.png

New table.

Table 2 = SUMMARIZE('Table','Table'[Date],'Table'[Name],"start time",MIN('Table'[Call Interval Start]),"end time",MAX('Table'[Call Interval End]))

Try this column.

times = DATEDIFF('Table 2'[start time],'Table 2'[end time],SECOND)/3600

vcgaomsft_1-1645181326361.png

Try this measure.

the calls per hours1 = 
VAR _dayhours = CALCULATE(COUNT('Table'[Number of Calls]),'Table'[Date]=MAX('Table 2'[Date]))
VAR _totalphonehours = CALCULATE(SUM('Table 2'[times]),ALLEXCEPT('Table 2','Table 2'[Date]))
RETURN
_totalphonehours/_dayhour

Put measure into visual,the result should be like this.

vcgaomsft_2-1645181485657.png

 

Attach the pbix file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

3 REPLIES 3

Hi @v-cgao-msft ,

 

That was a great help.
This technique did help me for what I was looking for.

Appreciate your work and Thank you once again! 

 

 

 

v-cgao-msft
Community Support
Community Support

Hi,

 

If I have posted a response that resolves your question,  then please consider Accept it as the solution to help the other members find it more quickly.  Thanks in advance.😊

 

Best Regards,

Community Support Team_Gao

v-cgao-msft
Community Support
Community Support

Hi @ashishoza12345 ,

 

Split Call Intervall column by delimiter in PowerQuery Editor

vcgaomsft_0-1645181235332.png

New table.

Table 2 = SUMMARIZE('Table','Table'[Date],'Table'[Name],"start time",MIN('Table'[Call Interval Start]),"end time",MAX('Table'[Call Interval End]))

Try this column.

times = DATEDIFF('Table 2'[start time],'Table 2'[end time],SECOND)/3600

vcgaomsft_1-1645181326361.png

Try this measure.

the calls per hours1 = 
VAR _dayhours = CALCULATE(COUNT('Table'[Number of Calls]),'Table'[Date]=MAX('Table 2'[Date]))
VAR _totalphonehours = CALCULATE(SUM('Table 2'[times]),ALLEXCEPT('Table 2','Table 2'[Date]))
RETURN
_totalphonehours/_dayhour

Put measure into visual,the result should be like this.

vcgaomsft_2-1645181485657.png

 

Attach the pbix file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors