call center
2 TopicsAdding SWITCH for Average Call Time and Average Hold Time
Hi! I need help adding SWITCH function to two separate DAX measures for a Call Center that calculates "Average Call Time" and "Average Hold Time. There are inactive relationships between Advisor and Date from a Prod Sales Table and Combined Call Logs Table. Please use the same slicer conditions I used in a previous Total Calls measure: Total Calls Dynamic = SWITCH( TRUE(), // Case 1: Single Advisor AND Single Date selected HASONEVALUE(UpdatedProd521[Advisor]) && HASONEVALUE(UpdatedProd521[Date]), CALCULATE( SUM('Combined Call Logs 5/17'[CALLS]), USERELATIONSHIP(UpdatedProd521[Advisor], 'Combined Call Logs 5/17'[ADVISOR]), FILTER( 'Combined Call Logs 5/17', 'Combined Call Logs 5/17'[DATE] = VALUES(UpdatedProd521[Date]) ) ), // Case 2: Only Advisor is selected HASONEVALUE(UpdatedProd521[Advisor]), CALCULATE( SUM('Combined Call Logs 5/17'[CALLS]), USERELATIONSHIP(UpdatedProd521[Advisor], 'Combined Call Logs 5/17'[ADVISOR]) ), // Case 3: Only Date is selected HASONEVALUE(UpdatedProd521[Date]), CALCULATE( SUM('Combined Call Logs 5/17'[CALLS]), USERELATIONSHIP('Combined Call Logs 5/17'[DATE], UpdatedProd521[Date]) ), // Default: sum all calls if no or multiple selections SUM('Combined Call Logs 5/17'[CALLS]) Here is my DAX for average call time (without Switch) and outputs 0 if no call time AverageCallDuration = VAR TotalSeconds = COALESCE(CALCULATE(AVERAGE('Combined Call Logs 5/17'[CALL TIME (SEC)]),USERELATIONSHIP(UpdatedProd521[Advisor], 'Combined Call Logs 5/17'[ADVISOR])),0) //Replace YourTable and SecondsColumn VAR Minutes = INT (TotalSeconds / 60) VAR Seconds = MOD (TotalSeconds, 60) RETURN FORMAT (Minutes, "0") & " min" Here's my DAX for Average Hold Time (without Switch) and outputs 0 if no hold time Avg Hold Time = VAR TotalSeconds = COALESCE(CALCULATE(AVERAGE('Combined Call Logs 5/17'[HOLD TIME (SEC)]),USERELATIONSHIP('UpdatedProd521'[Advisor], 'Combined Call Logs 5/17'[ADVISOR])),0) // Replace YourTable and SecondsColumn VAR Minutes = INT ( TotalSeconds / 60 ) VAR Seconds = MOD ( TotalSeconds, 60 ) RETURN FORMAT ( Minutes, "0" ) & " min, " & FORMAT ( Seconds, "0" ) & " sec"Solved702Views2likes2CommentsDaily Phone Call Report
Hello community, this is my very first question about PowerBI. I'm trying to create a report that shows how many call are being made by a SDR day by day to make a comparative clustered column chart. I'm using 3 columns from my phonecall table which comes from a Direct Query to our CRM (Dataverse) so i know there are some inherit limits with that. For my x-axis i have "Actual End" Column. For my y-axis i have "count of statuscodename" I tried distinct and still not working. And the legend is the "Owner" My question is, what I'm missing and why my graph is displaying multiple bars. Thank for all and have a great day!582Views0likes0Comments