2 Replies Latest reply on Dec 5, 2018 5:45 AM by David Katz

# Calculations on data sets with interpolated data points

Hi All --

I have a data series as shown in the attached workbook (Desktop 2018.2.3), where the "Type" Dimension differentiates between the "Limits" waveform and the "Measurements" waveform.  I would like to create a new calculated field, "Subtracted Result", that consists of the Limits waveform minus the Measurements waveform.

Ultimately, I'd like to show 3 waveforms on the same plot:

1.  The waveform on the LimitLines tab

2.  The waveform on the Measurements tab

3.  The Calculated Field that results from subtracting the Measurements waveform from the LimitLines waveform

I'm having trouble doing this because #1 is an interpolated view, in that I'm just using the "Path" feature of the Line Mark in order to give the continuous appearance of the LimitLines levels.  Therefore, I doubt this is a proper way to interpolate for the sake of performing calculations.

I've tried using Sets (like Set 1 in the workbook) and Calculated Fields (like Calculation1 in the workbook), but doing so invariably causes a problem that seems to make my goal unattainable.

I do have a working version of this in another workbook using a Calculated Field to generate the LimitLines waveform in the following manner (ignore the actual frequency values):

IF [frequency]>=150000 AND [frequency]<=300000 THEN 26

ELSEIF [frequency]>=530000 AND [frequency]<=1800000 THEN 20

ELSEIF [frequency]>=5900000 AND [frequency]<=6200000 THEN 20

ELSEIF [frequency]>=41000000 AND [frequency]<=108000000 THEN 18

ELSEIF [frequency]>=171000000 AND [frequency]<=245000000 THEN 16

ELSEIF [frequency]>=468000000 AND [frequency]<=944000000 THEN 31

ELSEIF [frequency]>=1447000000 AND [frequency]<=1494000000 THEN 18

ELSEIF [frequency]>=2320000000 AND [frequency]<=2500000000 THEN 24

ELSE 30 // Set a suitably high limit when no limit is otherwise specified

END

However, my concern after reviewing the Performance Recording output is that this calculation has to take place way too often throughout the use of a workbook, and even using "Compute Calculations Now" in my Extract won't reliably avoid this computation for various views.  Therefore, I was looking for a less resource-intensive way to express a series of arbitrary Limit Lines (as individual waveforms) and apply them mathematically to various Measurement waveforms in my views.

Any thoughts on a successful approach here?

Thanks and regards,

David

• ###### 1. Re: Calculations on data sets with interpolated data points

Hi David,

May be Binning the [Frequency],

then writing down the [Amplitude]

as a Table Calculation across Bins,

then writing down the Difference

as another (Nested) Table Calculation --

with the outer one is computing across

the Type dimension -- that would help.

Yours,

Yuri

• ###### 2. Re: Calculations on data sets with interpolated data points

Thanks, Yuriy.  I'm not yet sure if I'll be able to use binning for my application, but I'm marking this as correct because I think it does the job for similar situations that can use binning.

I appreciate the suggestion!

Regards,

David