1 Reply Latest reply on Nov 29, 2016 11:52 PM by triveni namballa

    I want to count rows by ignoring Null value row .How to do ?

    mausami sharma

      Hi , I want to calculate Average and for that i need row count but there are few rows having null but in row count i want to ignore all those rows which has null . How to proceed?

        • 1. Re: I want to count rows by ignoring Null value row .How to do ?
          triveni namballa

          Hi Sharma,

           

          By default, NULL does NOT signify a value of zero, but rather the absence of any data with which to compute a calculation.  A simple example is if you have values of 10, 20, 30 and NULL, the AVG function will compute (10+20+30) / 3 = 20 and NOT (10+20+30+0) / 4 = 15

           

          To force the calculation to treat NULL as 0 and achieve the 15 with the AVG function, you could create a calculated field as:
          IFNULL([MeasureField],0)

          Then, use this alternate field in your view instead of the original measure with NULL values and your calculations and aggregations should treat the NULL values as 0.

           

          Thanks,

          Triveni.