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
timwilson
Frequent Visitor

DAX Help, store value in variable unfiltered but filtered by slicer

Hi,

 

I'm trying to recreate a contact centre view, I require staff required and staff on phone by interval.

 

Calls that have been answered attract handling time, and when I try and store that as a variable and multiply that by all calls (not just answered), it only will multiply it by the calls answered, I assume that's because it's matching rows for the handling time measure.

 

How do I store the handling time measure in a variable that can be used regardless if there is a matching row for the call counts?

 

The workload (FTE) measure should return a different result than Onphone(FTE). 

Workbook : https://drive.google.com/open?id=0B7_6Zpn28a-LTUk1VmxwYXBLajA

 

1 ACCEPTED SOLUTION

@timwilson

 

You input incorrect AHT expression in Workload(FTE) measure.

 

Your measue is:

 

WorkLoad(FTE) =
VAR AHT =
    DIVIDE (
        (
            SUM ( Query1[ActiveDuration] ) + SUM ( Query1[HoldDuration] )
                + SUM ( Query1[ConsultDuration] )
                + SUM ( Query1[ConfDuration] )
                + SUM ( Query1[WrapDuration] )
        )
            / 1000,
        SUM ( Query1[InboundQueuedCount] ),
        0
    )
VAR QueueCalls =
    SUM ( Query1[InboundQueuedCount] )
RETURN
    DIVIDE ( ( QueueCalls * AHT ), 900, 0 )

 

But your AHT measure is:

 

AHT =
DIVIDE (
    (
        SUM ( Query1[ActiveDuration] ) + SUM ( Query1[HoldDuration] )
            + SUM ( Query1[ConsultDuration] )
            + SUM ( Query1[ConfDuration] )
            + SUM ( Query1[WrapDuration] )
    )
        / 1000,
    CALCULATE ( SUM ( Query1[InboundQueuedCount] ), Query1[CallActionId] = 8 ),
    0
)

Just replace AHT variable with correct formula, it can return correct result.

 

 

0.PNG

 

Regards,

View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

is it always the same amount?  ive looked at your model but can you direct me to the exact measure you are trying to accomplish this?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




No the problem is that it's showing as the same amount in the model.

 

The calculation is ((calls*handletime)/intervallengthseconds (900) in this case).

 

It should look like this:

 

Where wkload for 8:30 interval is (32*544.6)/900

 

IntervalInboundQueuedCountAHTWkLoadOnPhone
3/05/2017 8:3032544.619.410.9
3/05/2017 8:4517620.211.76.2
3/05/2017 9:0025641.917.83.6
3/05/2017 9:1535509.419.89.1
3/05/2017 9:3023440.911.34.9
3/05/2017 9:4519553.711.76.8

 

In the model I get the lower figure which leads me to believe it's only calculating rows where the AHT measure components are populated, if blank it seems to ignore the calls.

@timwilson

 

You input incorrect AHT expression in Workload(FTE) measure.

 

Your measue is:

 

WorkLoad(FTE) =
VAR AHT =
    DIVIDE (
        (
            SUM ( Query1[ActiveDuration] ) + SUM ( Query1[HoldDuration] )
                + SUM ( Query1[ConsultDuration] )
                + SUM ( Query1[ConfDuration] )
                + SUM ( Query1[WrapDuration] )
        )
            / 1000,
        SUM ( Query1[InboundQueuedCount] ),
        0
    )
VAR QueueCalls =
    SUM ( Query1[InboundQueuedCount] )
RETURN
    DIVIDE ( ( QueueCalls * AHT ), 900, 0 )

 

But your AHT measure is:

 

AHT =
DIVIDE (
    (
        SUM ( Query1[ActiveDuration] ) + SUM ( Query1[HoldDuration] )
            + SUM ( Query1[ConsultDuration] )
            + SUM ( Query1[ConfDuration] )
            + SUM ( Query1[WrapDuration] )
    )
        / 1000,
    CALCULATE ( SUM ( Query1[InboundQueuedCount] ), Query1[CallActionId] = 8 ),
    0
)

Just replace AHT variable with correct formula, it can return correct result.

 

 

0.PNG

 

Regards,

Oh wow, that is really silly of me.

 

Thank you!

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.