2 Replies Latest reply on Nov 2, 2018 9:26 AM by Eric Soderlund

    How do I create a set containing only members that have no missing values within a time series

    Eric Soderlund

      Hi Community!

      I think this challenge will be solved by using sets, but I have much to learn about sets and hope someone can point me in the right direction for this particular case.

       

      Suppose I have a dataset with 3 columns: year, station, and data, in which not every station has a data value in every year (see table below, also attached). My goal is to create a subset that contains only the stations that have data for every year within a user-selected time frame while excluding stations that do not have data for every year in the selected time frame.

       

      For example, using the data table below, if someone selected the full time series, 2009-2018, only stations 2 and 4 would be part of the set. However, when 2009-2011 is selected, all 4 stations would be in the set.

       

       

      Any advice on how this would be achieved?

      Big thanks

       

      YearStationdata
      200910.3
      200910.69
      200920.3
      200920.34
      200920.9
      200920.12
      200920.61
      200920.41
      200920.32
      200920.77
      200920.82
      200920.65
      200930.98
      200930.59
      200930.94
      200940.2
      200940.68
      200940.08
      201010.53
      201010.91
      201010.24
      201020.29
      201020.77
      201030.44
      201030.91
      201030.51
      201040.02
      201040.03
      201040.25
      201110.16
      201120.01
      201121
      201120.48
      201130.41
      201140.35
      201140.36
      201220.55
      201230.98
      201230.24
      201230.09
      201230.21
      201230.16
      201230.48
      201240.21
      201240.83
      201240.13
      201241
      201310.93
      201320.05
      201320.52
      201330.7
      201330.05
      201340.78
      201340.9
      201410.06
      201420.54
      201420.2
      201430.38
      201430.86
      201430.76
      201440.75
      201440.8
      201510.76
      201510.87
      201510.09
      201510.07
      201510.69
      201510.2
      201521
      201520.98
      201520.88
      201540.32
      201540.02
      201610.25
      201610.35
      201610.8
      201610
      201620.99
      201630.78
      201630.28
      201630.77
      201630.77
      201640.76
      201640.68
      201720.36
      201720.08
      201720.83
      201720.77
      201730.15
      201730.23
      201730.04
      201740.95
      201740.01
      201740.44
      201820.35
      201820.54
      201830.47
      201840.31
      201840
      201840.05

       

                                                                                                                           

      Row Labels2009201020112012201320142015201620172018Grand Total
      10.991.680.160.930.062.681.47.9
      25.241.061.490.550.570.742.860.992.040.8916.43
      32.511.860.412.160.7522.60.420.4713.18
      40.960.30.712.171.681.550.341.441.40.3610.91