Forum Discussion

Ffitzpatrick47's avatar
8 years ago

DAX: Average over data gaps

These are just cumulative sums over some measure

 

calculate(sum[x],filter(all(t[d]),d<max[d]))

Is there a way to fill in these gaps?

2 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    Ffitzpatrick47 wrote:

    These are just cumulative sums over some measure

     

    calculate(sum[x],filter(all(t[d]),d<max[d]))

    Is there a way to fill in these gaps?


    Ffitzpatrick47

    What would you like to fill in the gaps? Please post some sample data and expected output.

    • Ffitzpatrick47's avatar
      Ffitzpatrick47
      Helper II

      Maybe the average of the two points so the line will be continuous.  Numpy has a nanmean function for example that just takes the average of the two adjacent values to make it smooth.  I figured Microsoft bought R, R has a couple functions too that do this too.  Does Microsoft?