Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've got a variable called vAvgCallsPerHour which is a calculation stored as a variable so that if it changes, I only have to make one change which works fine
Calculation
3600/(Sum({<explanation={AMBWrapUp,ACDCallWrapup}>}duration)/sum({<explanation={ACDCallWrapup}>}Count)+Sum({<explanation={ACDAgentPicked}>}duration)/Sum({<Type={InboundCall}>}Count))
I then need to display this value in a text box which I do by using '=$(vAvgCallsPerHour)' but this is displayed to approx 10 decimal places.
I've tried using =num($(vAvgCallsPerHour),'##.##') and the syntax checker seems happy enough but when I click ok I get ' Error: Error in expression: ')' expected
If I remove the dollar expansion i just get a -
What am I doing wrong?
Thanks
Add the num() expression around the variable declaration.
Remember num() is just a formatting expression to truly round the value use round(xxx, 0.1), ceil(xxx, 0.1) or floor(xxx, 0.1)
Let vAvgCallsPerHour = num(3600/(Sum({<exp...InboundCall}>}Count)), '##.##') ;
Add the num() expression around the variable declaration.
Remember num() is just a formatting expression to truly round the value use round(xxx, 0.1), ceil(xxx, 0.1) or floor(xxx, 0.1)
Let vAvgCallsPerHour = num(3600/(Sum({<exp...InboundCall}>}Count)), '##.##') ;
Hi Gavin,
Best would be to use Round.
Round(3600/(Sum({<explanation={AMBWrapUp,ACDCallWrapup}>}duration)/sum({<explanation={ACDCallWrapup}>}Count)+Sum({<explanation={ACDAgentPicked}>}duration)/Sum({<Type={InboundCall}>}Count)),0.01)
use:
Round( (3600/(Sum({<explanation={AMBWrapUp,ACDCallWrapup}>}duration)/sum({<explanation={ACDCallWrapup}>}Count)+Sum({<explanation={ACDAgentPicked}>}duration)/Sum({<Type={InboundCall}>}Count))), 0.10)
You're a genius! Worked a treat.. Thank you