Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey there
can anyone point me in the right direction here with adding a column to a table? As per below, its logged/interactions total. The total obviously will change based on the selection, but I need it as the same value in each row, due the the data simply being pasted into a legacy spreadsheet.
Many thanks!
Oh my bad... I think Logged is referencing to Sum(Logged), right? Try this
sum(Logged)/
Sum(Aggr(
if
(
sum(Logged)>= Sum([ava_HandledByAgent.Voice])+Sum([ava_HandledByAgent.Non-Voice])-Sum([ava_HandledByAgent.Orders]) //more logged than interactions
AND
Sum([ava_HandledByAgent.Voice])+Sum([ava_HandledByAgent.Non-Voice])-Sum([ava_HandledByAgent.Orders]) > 0 //and at least one interaction
,sum(Logged)//then cap logged figure to interactions
,Sum([ava_HandledByAgent.Voice])+Sum([ava_HandledByAgent.Non-Voice])-Sum([ava_HandledByAgent.Orders]) //or interactions as normal
),
name_uq))
May be this
Avg(TOTAL Aggr(Logged/Interactions, name_uq))
Read about What does the TOTAL qualifier do? here
Thanks for the speedy reply Sunny, and the link. I thought it might need set analysis though I am not yet familiar with this.
I havent read the link yet, I have however tried your expression and it didn't seem to work.
This might help!
Logged and Interactions are fields or expressions?
you could use the below expression:
sum(total Logged) / sum(total Interactions)
Good question. They are expressions in the master items. However Logged is also a field name, which probably isnt a good idea/practice (just realised). Logged expression = sum(Logged)
So, try something like this
Avg(TOTAL Aggr(Sum(Logged)/Sum(Interactions), name_uq))
Thanks to you both. I have got it working, though need to come back with a clearer head, I have confused myself a little. Having the field names the same as the expression, and a sum + another sum in one of them, I just need to relook at and understand Sunnys answer. It only lets me mark 1 answer as correct
anyway Andreas method is working, though for some reason I had to deconstruct the expression
sum(Total Logged)/sum (total[ava_Voice]+[ava_NV]-[ava_Orders])
I'll have a play and come back