Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
bcampbell
Helper I
Helper I

Average Times when there is blank / no data

Good Day,

 

I could nee some assistance on Average times from Data when I may not have a time entry

 

For Example

NUMBERCALLDISPCMPLT
113:48:3213:50:4414:09:55
210:01:01 10:19:58

 

I would like to show an Average Time from DISP to CMPLT 

 

If I use the following calc measures ,  ( I know I could bring this all into one , this just allows me to stay organized)

 

AVG CMPLT = CALCULATE(AVERAGE(rlmain[Time]),FILTER(rlmain, FIND("CMPLT",rlmain[tencode],, BLANK()) <>0))
AVG DISP = CALCULATE(AVERAGE(rlmain[Time]),FILTER(rlmain, FIND("DISP",rlmain[tencode],, BLANK()) <>0))
AVG VALUE_CMPLT-DISP = [AVG CMPLT]-[AVG DISP]
TIME FORMAT_AVG VALUE_CMPLT-DISP = TIME([AVG VALUE_CMPLT-DISP]*24,0,MOD([AVG VALUE_CMPLT-DISP]*24*3600, 3600))

 

 

 

 

 

 

I will use the TIME FORMAT_AVG VALUE_CMPLT-DISP on a card for display

My Average card shows an Error , whereas if I select each entry separately it shows 00:19:11 for the Number 1 event and displays 10:19:58 for the Number 2 Event

 

I tried another calc/measure

 

AvgDistoCmplt = format((CALCULATE(AVERAGE(rlmain[Time]),FILTER(rlmain, FIND("DISP",rlmain[tencode],, BLANK()) <>0))/CALCULATE (
    DISTINCTCOUNT( rlmain[callid]),
   CONTAINSROW (
        { "DISP", "CMPLT"},rlmain[Tencode]
    )))-(CALCULATE(AVERAGE(rlmain[Time]),FILTER(rlmain, FIND("CMPLT",rlmain[tencode],, BLANK()) <>0))/CALCULATE (
    DISTINCTCOUNT( rlmain[callid]),
   CONTAINSROW (
        { "DISP", "CMPLT"},rlmain[Tencode]
    )))  ,"hh:mm:ss")

 

 

 

I will use the AvgDistoCmplt on a card for display

My Average card shows an 00:47:54 , whereas if I select each entry separately it shows 00:19:11 for the Number 1 event and displays 10:19:58 for the Number 2 Event

 

 

How can I work this to ignore the no entry for DISP

 

Thank You

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @bcampbell ,

 

You could do the subtraction calculation firstly. Then calculate the average with the filter of "DISP<>BLANK() and CMPLT<>BLANK()".

You could ignore the null value with this logic.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-eachen-msft
Community Support
Community Support

Hi @bcampbell ,

 

You could do the subtraction calculation firstly. Then calculate the average with the filter of "DISP<>BLANK() and CMPLT<>BLANK()".

You could ignore the null value with this logic.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.