Forum Discussion

bcampbell's avatar
bcampbell
Helper I
7 years ago
Solved

Difference between two Average Measure , but exclude if blank

I need to create a measure that I beleived to be simple , 

 

My measure currently is

 

AVGVAL_DISP-CALL = [AVG DISP]-[AVG CALL]

That does not work if where the AVG DISP measure has no timestamp in source and results in the CALL Timestamp value being the result and finally the AVG

 

Is there a way to write a measure that can ignore blanks ?

Do i need to go back to my  source measure that provides me the average ?

 

AVG CALL = CALCULATE(AVERAGE(frmain[Time]), FILTER(frmain,frmain[Time] <>0))

 

Thanks for any help

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi,

     

    Can you try this.

    AVG CALL = CALCULATE(AVERAGE(frmain[Time]), FILTER(frmain,NOT ISBLANK(frmain[Time])))

     

    Regards,

    Pavan Vanguri. 

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

     

    Can you try this.

    AVG CALL = CALCULATE(AVERAGE(frmain[Time]), FILTER(frmain,NOT ISBLANK(frmain[Time])))

     

    Regards,

    Pavan Vanguri. 

    • bcampbell's avatar
      bcampbell
      Helper I

      I am still getting some errors when I intoduce a slicer

       

      Looking at the selection ,

       

      one record is missing a time for "DISP"

       

      Do I need to adjust the next part of my measures ?

       

      AVGVAL_DISP-CALL = [AVG DISP]-[AVG CALL]

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

         

        Can you please provide any example.