Take the following dataset as an example.
| Dimension | Measure |
| A | 100 |
| B | 200 |
| C | |
| D | 150 |
| E | 600 |
| F | |
| G | |
| H | 400 |
| I | 200 |
| J | |
| K | |
| L | |
| M | 250 |
| N | 500 |
| O | 1000 |
Because this dataset has missing values along a discrete dimension, a standard line chart will fail to render smoothly—either breaking into disconnected segments or dropping inaccurately to zero.
The task is to implement Linear Interpolation to achieve following line chart.
To implement linear interpolation with sparse data, create following calculated fields and edit table calculations.
Select Analysis > Create Calculated Field... to create the following calculation fields
IF NOT ISNULL(SUM([Measure])) THEN INDEX() ENDIFNULL([1_existing data INDEX],PREVIOUS_VALUE(0))IFNULL([1_existing data INDEX],PREVIOUS_VALUE(0))[3_missing data NEXT INDEX]-[2_missing data PREVIOUS INDEX]INDEX()-[2_missing data PREVIOUS INDEX]IFNULL(SUM([Measure]),PREVIOUS_VALUE(0))IFNULL(SUM([Measure]),PREVIOUS_VALUE(0)) [7_missing data NEXT Measure]-[6_missing data PREVIOUS Measure]IFNULL(LOOKUP(SUM([Measure]),0),[8_missing data VALUE difference]/[4_missing data INDEX difference]*[5_missing data INDEX difference to current spot]+[6_missing data PREVIOUS Measure])005389112
51 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.