diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_help.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_help.tsx index 809bf694aeb060..dbdbcf226d9bb6 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_help.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_help.tsx @@ -68,7 +68,82 @@ function FormulaHelp({ label: i18n.translate('xpack.lens.formulaFrequentlyUsedHeading', { defaultMessage: 'Common formulas', }), - items: [], + description: i18n.translate('xpack.lens.formulaCommonFormulaDocumentation', { + defaultMessage: `The most common formulas are dividing two values to produce a percent. To display accurately, set "value format" to "percent".`, + }), + + items: [ + { + label: i18n.translate('xpack.lens.formulaDocumentation.filterRatio', { + defaultMessage: 'Filter ratio', + }), + description: ( + + ), + }, + { + label: i18n.translate('xpack.lens.formulaDocumentation.weekOverWeek', { + defaultMessage: 'Week over week', + }), + description: ( + + ), + }, + { + label: i18n.translate('xpack.lens.formulaDocumentation.percentOfTotal', { + defaultMessage: 'Percent of total', + }), + description: ( + + ), + }, + ], }); helpGroups.push({ @@ -337,58 +412,7 @@ Use the symbols +, -, /, and * to perform basic math. /> -
{ - if (el) { - scrollTargets.current[helpGroups[1].label] = el; - } - }} - > - -
- - {helpGroups.slice(2).map((helpGroup, index) => { + {helpGroups.slice(1).map((helpGroup, index) => { return (
{helpGroup.description}

- {helpGroups[index + 2].items.map((helpItem) => { + {helpGroups[index + 1].items.map((helpItem) => { return (