Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi 🙂
I have some call stat data I'm struggling with (my brain is refusing to work) and any help would be fab.
I have a col that sorts our calls like so:
Handled = IF('Call'[Contact Disposition Name] = "Handled",
SWITCH(TRUE(),
('Call'[Queue Time]) <= TIME(0,0,10),"Handled Within 10 Seconds",
('Call'[Queue Time]) <= TIME(0,0,20), "Handled Within 20 Seconds",
('Call'[Queue Time]) <= TIME(0,0,30), "Handled Within 30 Seconds",
('Call'[Queue Time]) < TIME(0,0,60), "Handled Outside 30 Seconds",
('Call'[Queue Time]) >= TIME(0,0,60), "Handled Outside 60 Seconds"))
Now, when I select it to show it as a percentage of the grand total, it's obviously doing a grand total per catagory - what I need is for 'Handled Within 10 Seconds" and "Handled Within 20 Seconds" to add up -- because if it's answered within 20, it's been answered within 10, but I cannot for the life of me figure out how to do that.
So, for example:
10 Seconds - 80%
20 Seconds - 5% + 80%(from 10 seconds) = 85%
30 Seconds - 3% + 85% = 87%
And so on and so forth.
Thank you!
Solved! Go to Solution.
Hi @smather ,
You can update the formula of your measure [TestMeasure] as below and check whether you can get the correct result.
TestMeasure =
VAR _selhandabdon =
SELECTEDVALUE ( 'Call'[Handled and Abandoned] )
VAR TenSecs =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER (
ALLSELECTED ( 'Call' ),
'Call'[Handled and Abandoned] = "Handled Within 10 Seconds"
),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
VAR TwentySecs =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER (
ALLSELECTED ( 'Call' ),
'Call'[Handled and Abandoned] = "Handled Within 20 Seconds"
),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
VAR ThirtySecs =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER (
ALLSELECTED ( 'Call' ),
'Call'[Handled and Abandoned] = "Handled Within 30 Seconds"
),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
VAR SixtySecs =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER (
ALLSELECTED ( 'Call' ),
'Call'[Handled and Abandoned] = "Handled in SLT (60 Seconds)"
),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
VAR Abandoned =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER ( ALLSELECTED ( 'Call' ), 'Call'[Handled and Abandoned] = "Abandoned" ),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
RETURN
IF (
_selhandabdon = "Handled Within 10 Seconds",
TenSecs,
IF (
_selhandabdon = "Handled Within 20 Seconds",
TenSecs + TwentySecs,
IF (
_selhandabdon = "Handled Within 30 Seconds",
TenSecs + TwentySecs + ThirtySecs,
IF (
_selhandabdon = "Handled in SLT (60 Seconds)",
TenSecs + TwentySecs + ThirtySecs + SixtySecs,
IF ( _selhandabdon = "Abandoned", Abandoned )
)
)
)
)
|
Best Regards
Hi @smather ,
I'm sorry that I still don't understand what's your expected result... I have created a sample table based on your description and the result you may want, please help me to confirm if it is what you want. If not, please share some sample data from your table (excluding sensitive data) and your expected result. If there is a calculation involved, please also provide the logic for the calculation. Thank you.
Sample data:
Expected result: wheteher the field Percent in below table is your expected result?
Best Regards
Hi @v-yiruan-msft @Greg_Deckler
Sorry, I'm not the best at explaining and I've been trying to figure it out on my own. Let me give you an example of data I'm working with:
Contact Disposition Name | Queue Time | Handled and Abandoned | X |
Handled | 00:00:05 | Handled Within 10 Seconds | H1 |
Handled | 00:00:32 | Handled in SLT (60 Seconds) | H4 |
Abandoned | 00:00:15 | Abandoned | A1 |
Handled | 00:00:03 | Handled Within 10 Seconds | H1 |
X is a formula:
X = SWITCH(
'Call'[Handled and Abandoned],
"Handled Within 10 Seconds", "H1",
"Handled Within 20 Seconds", "H2",
"Handled Within 30 Seconds", "H3",
"Handled in SLT (60 Seconds)", "H4",
"Abandoned", "A1",
"U1"
)
I've tried to do a VAR fomula to get what I want, but I'm being told MAXX doesn't work with boolean so I'm a bit stuck again:
TestMeasure =
VAR TenSecs = CALCULATE(SUM('Call'[All Calls]),FILTER(FILTER(ALLSELECTED('Call'), 'Call'[Handled and Abandoned] = "Handled Within 10 Seconds"),'Call'[X] <= MAX('Call'[X])))
VAR TwentySecs = CALCULATE(SUM('Call'[All Calls]),FILTER(FILTER(ALLSELECTED('Call'), 'Call'[Handled and Abandoned] = "Handled Within 20 Seconds"),'Call'[X] <= MAX('Call'[X])))
VAR ThirtySecs = CALCULATE(SUM('Call'[All Calls]),FILTER(FILTER(ALLSELECTED('Call'), 'Call'[Handled and Abandoned] = "Handled Within 30 Seconds"),'Call'[X] <= MAX('Call'[X])))
VAR SixtySecs = CALCULATE(SUM('Call'[All Calls]),FILTER(FILTER(ALLSELECTED('Call'), 'Call'[Handled and Abandoned] = "Handled in SLT (60 Seconds)"),'Call'[X] <= MAX('Call'[X])))
VAR Abandoned = CALCULATE(SUM('Call'[All Calls]),FILTER(FILTER(ALLSELECTED('Call'), 'Call'[Handled and Abandoned] = "Abandoned"),'Call'[X] <= MAX('Call'[X])))
RETURN IF(MAXX('Call','Call'[Handled and Abandoned] = "Handled Within 10 Seconds"),TenSecs,IF(MAXX('Call','Call'[Handled and Abandoned] = "Handled Within 20 Seconds"),TenSecs+TwentySecs,IF(MAXX('Call','Call'[Handled and Abandoned] = "Handled Within 30 Seconds"),TenSecs+TwentySecs+ThirtySecs,IF(MAXX('Call','Call'[Handled and Abandoned] = "Handled in SLT (60 Seconds)"),TenSecs+TwentySecs+ThirtySecs+SixtySecs,IF(MAXX('Call','Call'[Handled and Abandoned] = "Abandoned"),Abandoned)))))
Hopefully TestMeasure gives more of an idea of what I'm after - to add up 10 & 20 second calls together and so on - if it's handled in 10, it's handled within 20, 30 and 60.
When I get that working, I'll then be able to tweak it to get the %s.
Any help would be great.
Hi @smather ,
You can update the formula of your measure [TestMeasure] as below and check whether you can get the correct result.
TestMeasure =
VAR _selhandabdon =
SELECTEDVALUE ( 'Call'[Handled and Abandoned] )
VAR TenSecs =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER (
ALLSELECTED ( 'Call' ),
'Call'[Handled and Abandoned] = "Handled Within 10 Seconds"
),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
VAR TwentySecs =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER (
ALLSELECTED ( 'Call' ),
'Call'[Handled and Abandoned] = "Handled Within 20 Seconds"
),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
VAR ThirtySecs =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER (
ALLSELECTED ( 'Call' ),
'Call'[Handled and Abandoned] = "Handled Within 30 Seconds"
),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
VAR SixtySecs =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER (
ALLSELECTED ( 'Call' ),
'Call'[Handled and Abandoned] = "Handled in SLT (60 Seconds)"
),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
VAR Abandoned =
CALCULATE (
SUM ( 'Call'[All Calls] ),
FILTER (
FILTER ( ALLSELECTED ( 'Call' ), 'Call'[Handled and Abandoned] = "Abandoned" ),
'Call'[X] <= MAX ( 'Call'[X] )
)
)
RETURN
IF (
_selhandabdon = "Handled Within 10 Seconds",
TenSecs,
IF (
_selhandabdon = "Handled Within 20 Seconds",
TenSecs + TwentySecs,
IF (
_selhandabdon = "Handled Within 30 Seconds",
TenSecs + TwentySecs + ThirtySecs,
IF (
_selhandabdon = "Handled in SLT (60 Seconds)",
TenSecs + TwentySecs + ThirtySecs + SixtySecs,
IF ( _selhandabdon = "Abandoned", Abandoned )
)
)
)
)
|
Best Regards
@v-yiruan-msft sorry to be a nightmare, would you have any idea how to tweak it to make another measure to get the % of calls from all calls in each cat (Handled With 10/20/30 etc) ?
Hi @smather ,
You can create a measure as below to get the % of calls from all calls in each category, later please check whether it can return the correct result....
% of calls =
DIVIDE (
[TestMeasure],
CALCULATE ( SUM ( 'Call'[All Calls] ), ALL ( 'Call' ) ),
0
)
If the above one is not what you want, please provide your expected result with the calculation logic for the % of the calls from all calls and special examples. Thank you.
Best Regards
Hi @v-yiruan-msft - apologies, me again. This is all perfect until it comes to filtering via month. Is there something I need to add to the VAR so it regonises being filtered via month and to still do the cumulative figures?
Thank you for that! This is the result I'm getting for Jan:
Total incoming calls: 1081 - broken out into, as per TestMeasure, which is correct:
Abandoned | 89 |
Handled Within 10 | 558 |
Handled Within 20 | 705 |
Handled Within 30 | 776 |
Handled in 60 | 842 |
Outside SLT | 150 |
% of calls measure gives me this:
Abandoned | 7.61% |
Handled Within 10 | 47.71% |
Handled Within 20 | 60.28% |
Handled Within 30 | 66.35% |
Handled in 60 | 72.00% |
Outside SLT | 12.83% |
it's messing up the format: 7.61%, 47.71%, 60.28%, 66.35%, 72.00% & 12.83% in order.
I was expecting from Jan, figures more like this:
Abandoned | 8.23% |
Handled Within 10 | 51.62% |
Handled Within 20 | 65.22% |
Handled Within 30 | 71.79% |
Handled in 60 | 77.89% |
Outside SLT | 13.88 |
8.23%, 51.62%, 65.22%, 71.79%, 77.89%, 13.88%
is it because I have my data filtered?
@smather Without sample data tough to be specific but I would just figure out what category I am in and then add the two together (10 seconds and 20 seconds).
My data looks a little like this:
Session ID | Start Time | End Time | Queue Time | Talk Time | Sector | Handled | Handled/Abandoned | Number Called | Countable Call |
There's a lot more cols than that, but it's just a general idea. The handled col has the code in it above, so if it's below ten seconds, that row will say "Handled Within 10 seconds", if it's below twenty seconds, "Handled Within 20 Seconds", etc. It's not a number I can physically add up. It adds up the countable calls and sorts them into "Handled Within 10/20/30/Outside 60 Seconds" and when you do show as a percentage of the grand total, it does - but I need thefigures to roll up, so whatever is in 10 seconds adds onto 20 seconds numbers.
I don't know how to add them up, that's what I'm asking, poorly.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
89 | |
87 | |
81 | |
64 | |
49 |
User | Count |
---|---|
123 | |
109 | |
88 | |
68 | |
67 |