summary | Multidimensional Analytical Query Language (MAQL) Multidimensional Analytical Query Language, or MAQL for short, is a querying language. It comes with a set of predefined functions that you can use for simple queries such as averages or complex statistical analysis such as skewness and kurtosis.Before you get started, you should know that:1. Metrics always return numerical values.2. Metric can only return value based on some dimensionality/context in which it is executed.3. Metrics in MAQL start with keyword SELECT.4. A simple aggregation function looks like this:5. SELECT SUM({fact/quantity}) Write your first metric The following examples will show you a simple progression path to building your own metrics. Each example is followed by syntax description.MAQL always works in the context of data available in a given logical data model which determines the available data and utilization of MAQL statements.Example 1 - quantityThe countThe following sample uses the SUM COUNT aggregation function on a fact (quantity) to return total all-time salesthe count of tags associated with content:SELECT SUMCOUNT({factlabel/quantity})This will result in a visualization featuring a single number, total units sold, in a single row.Example 2 - adding arithmeticTo find out what was the revenue of the total all-time sales, first multiply two facts (quantity and price) and then aggregate to the context:SELECT SUM({fact/quantity} * {fact/price})This will result in a visualization featuring a single number, revenue for total units sold, in a single row.Example 3 - conditioning/filtering and reusing metricsThe following example reuses the existing metric (Amount Sold) and combines it with the conditional statement WHERE defined by the Label (Color) and Label Value (Red).SELECT {metric/amount_sold} WHERE {label/Color}="redtags.id})Example 2 - conditioning/filtering The following example uses the conditional statement WHERE to return a count of tasks that were completed.SELECT COUNT ({label/tasks.id}) WHERE {label/tasks.completed}= "true"When constructing complex metrics, your choice of attributes and attribute values is determined by the context of available data. Add Comments to Custom Metric You can add comments to your customized metric by including the # symbol.Syntax SELECT {metric/amount_sold} # this is a commentAnything after the hash sign # is ignored during computation. If you need multiline comments, each line must start with a #. Return to homepage PLEASE NOTE: Click here to learn more about MAQL. |
---|
page | {"premium":true,"id":"pdN0WowSrVG8F4fryc-j1","name":"page","children":[{"params":{"background":"#0000","padding":20,"gap":10,"image":{"value":"att456720389","target":"_blank","type":"attachment"}},"children":[{"name":"row","children":[{"name":"column","children":[{"name":"image","params":{"templateId":"square","alignment":"center","width":100,"height":100,"position":"center center","borderRadius":{"all":20,"bbl":0,"bbr":0,"btl":0,"btr":0,"isIndividualCorners":false},"image":{"value":"att448266262","target":"_blank","type":"attachment"}},"children":[],"id":"WMxKuf79M5-QgwzaJ8nVr"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"cgrj7PG4GTJMi0UxI41N6"},{"name":"column","children":[{"name":"text","params":{"value":[{"type":"paragraph"":true,"id":"pdN0WowSrVG8F4fryc-j1","name":"page","children":[{"params":{"background":"#0000","padding":20,"gap":10,"image":{"value":"att456720389","target":"_blank","type":"attachment"}},"children":[{"typename":"paragraphrow","children":[{"fontFamilyname":"Poppins, sans-serif","text":"Multidimensional Analytical Query Language (MAQL)","fontSize":22,"letterSpacing":0,"lineHeight":"35px","color":"#E6AC00"}],"aligncolumn","children":[{"name":"image","params":{"templateId":"square","alignment":"center"}]}]},"childrenwidth":[]100,"idheight":"DTcH3DS3QvpAmVclBtLgC"}100,{"nameposition":"dividercenter center","paramsborderRadius":{"templateIdall":20,"solid shortbbl":0,"colorbbr":0,"#E0A804btl":0,"alignmentbtr":"center"0,"fontSizeisIndividualCorners":24false},"fontColorimage":{"#000000value",:"heightatt448266262":1,"borderStyletarget":"solid_blank","widthtype":200"attachment"}},"children":[],"id":"pT6EPjeQMrjbrXfWMxKuf79M5-mwaPEQgwzaJ8nVr"}],"params":{"nameborderRadius":{"textall":0,"paramsbtl":{0,"valuebbl":[{0,"typebtr":0,"paragraphbbr":0,"childrenisIndividualCorners":[{"typefalse},"padding":0,"paragraphgap":20,"alignverticalAlignment":"center"},"childrenid":[{"letterSpacingcgrj7PG4GTJMi0UxI41N6":0},{"fontFamilyname":"Poppins, sans-serifcolumn","fontSizechildren":16,[{"lineHeightname":"35pxtext","colorparams":{"#2A2A2Avalue",:[{"texttype":"paragraph"}]}]}]},"children":[],{"idtype":"ULsHOQ_ITd1GvVztCEzoMparagraph"}],"paramschildren":[{"borderRadiusfontFamily":{"all":0Poppins, sans-serif","btltext":0"Multidimensional Analytical Query Language (MAQL)","bblfontSize":022,"btrletterSpacing":0,"bbrlineHeight":0,"isIndividualCorners35px":false},"paddingcolor":0,"gap#E6AC00":20}],"verticalAlignmentalign":"center"}]}]},"children":[],"id":"cq2IWUh5E-g0cbyVU6hORDTcH3DS3QvpAmVclBtLgC"},{"name":"columndivider","params":{"childrentemplateId":[]"solid short","paramscolor":{"borderRadius"#E0A804","alignment":{"allcenter":0,"btlfontSize":024,"bblfontColor":0"#000000","btrheight":01,"bbrborderStyle":0"solid","isIndividualCornerswidth":false200},"paddingchildren":0[],"gapid":20,"verticalAlignment"pT6EPjeQMrjbrXf-mwaPE"},{"name":"centertext"},"idparams":{"9zhpAEKMlbMFBvambmBfSvalue"},:[{"nametype":"columnparagraph","children":[],{"paramstype":{"borderRadius"paragraph","align":{"allcenter":0,"btlchildren":0,[{"bblletterSpacing":0,"btrfontFamily":0,"bbr":0"Poppins, sans-serif","isIndividualCornersfontSize":false}16,"paddinglineHeight":0,"gap35px":20,"verticalAlignmentcolor":"center#2A2A2A"},"idtext":"t0bBWXGK-Zcx12gAgHjMJ""}]}]}]},{"namechildren":[],"columnid",:"children":[ULsHOQ_ITd1GvVztCEzoM"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"mtfM2T2_I5kFO2zw9TGi5cq2IWUh5E-g0cbyVU6hOR"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"5Z6McsHaHqxEXTbh1xs0R9zhpAEKMlbMFBvambmBfS"}],"params":{"layout":[1,2],"gap":15,"minHeight":200,"padding":10,"borderRadius":0},"id":"2knMWh2YlWaZYz6rxZqEG"}],"name":"sectioncolumn","id":"A_XowDO19qTVYs0Uum0qD"},{"id":"y4m0bR8N7bUJcKiBr7q5f""children":[],"params":{"backgroundborderRadius":{"light"all":0,"btl":0,"bbl":0,"#ffffffbtr":0,"darkbbr":0,"#1d2125isIndividualCorners":false},"padding":0,"gap":10}20,"childrenverticalAlignment":[]"center"},"nameid":"sectiont0bBWXGK-Zcx12gAgHjMJ"},{"idname":"GL7Yj2oktONIjujDwyQ7B"column","children":[],"params":{"backgroundborderRadius":{"lightall":0,"#ffffffbtl":0,"darkbbl":0,"#1d2125btr"}:0,"paddingbbr":0,"gapisIndividualCorners":10false},"childrenpadding":[{"id":"dg5_I6vQFlS2QPULpodGa","name0,"gap":20,"verticalAlignment":"rowcenter"},"children":[{"id":"KXyNZjt8kkvOvBuElg0F0mtfM2T2_I5kFO2zw9TGi5"},{"name":"column","children":[{"name":"text"],"params":{"templateIdborderRadius":{"simple paragraphall":0,"valuebtl":[{0,"typebbl":0,"paragraphbtr":0,"childrenbbr":[{0,"typeisIndividualCorners":false},"paragraphpadding":0,"childrengap":[{20,"typeverticalAlignment":"paragraphcenter"},"alignid":"center5Z6McsHaHqxEXTbh1xs0R"}],"childrenparams":[{"letterSpacinglayout":0,"fontFamily":"Poppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"Multidimensional Analytical Query Language, or MAQL for short, is a querying language. ","fontSize":18}]},{"type":"paragraph","align":"center","children":[{"letterSpacing":0,"fontFamily":"Poppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"It comes with a set of predefined functions that you can use for simple queries such as averages or complex statistical analysis such as skewness and kurtosis.","fontSize":18}]},{"type":"paragraph","align":"center","children":[{"letterSpacing":0,"fontFamily":"Poppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"","fontSize":18}]},{"type":"paragraph","align":"center[1,2],"gap":15,"minHeight":200,"padding":10,"borderRadius":0},"id":"2knMWh2YlWaZYz6rxZqEG"}],"name":"section","id":"A_XowDO19qTVYs0Uum0qD"},{"id":"y4m0bR8N7bUJcKiBr7q5f","params":{"background":{"light":"#ffffff","dark":"#1d2125"},"padding":0,"gap":10},"children":[],"name":"section"},{"id":"GL7Yj2oktONIjujDwyQ7B","params":{"background":{"light":"#ffffff","dark":"#1d2125"},"padding":0,"gap":10},"children":[{"id":"dg5_I6vQFlS2QPULpodGa","name":"row","children":[{"id":"KXyNZjt8kkvOvBuElg0F0","name":"column","children":[{"letterSpacingname":0,"fontFamily"text","params":{"templateId":"Poppins, sans-serifsimple paragraph","lineHeightvalue":[{"35pxtype","color":"#2A2A2Aparagraph","textchildren":"Before you get started, you should know that:[{"type":"paragraph","fontSizechildren":18}]},[{"type":"paragraph","align":"center","children":[{"letterSpacing":0,"fontFamily":"Poppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"1. Metrics always return numerical valuesMultidimensional Analytical Query Language, or MAQL for short, is a querying language. ","fontSize":18}]},{"type":"paragraph","align":"center","children":[{"letterSpacing":0,"fontFamily":"Poppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"2. Metric can only return value based on some dimensionality/context in which it is executedIt comes with a set of predefined functions that you can use for simple queries such as averages or complex statistical analysis such as skewness and kurtosis.","fontSize":18}]},{"type":"paragraph","align":"center","children":[{"letterSpacing":0,"fontFamily":"Poppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"3. Metrics in MAQL start with keyword SELECT.","fontSize":18}]},{"type":"paragraph","align":"center","children":[{"letterSpacing":0,"fontFamily":"Poppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"4. A simple aggregation function looks like thisBefore you get started, you should know that:","fontSize":18}]},{"type":"paragraph","align":"center","children":[{"letterSpacing":0,"fontFamily":"Poppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"5. SELECT SUM({fact/quantity})1. Metrics always return numerical values.","fontSize":18}]},{"type":"paragraph","align":"leftcenter","children":[{"letterSpacing":0,"fontFamily":"Poppins, sans-serif","fontSize":16,"lineHeight":"35px","color":"#2A2A2A","fontWeight":700,"text":""}]}]}]}]},"children":[],"id":"npahaaAK0AjVJfOViHrKD"}],"params":{"borderRadius":{"all2. Metric can only return value based on some dimensionality/context in which it is executed.","fontSize":18}]},{"type":"paragraph","align":"center","children":[{"letterSpacing":0,"btlfontFamily":0"Poppins, sans-serif","bbllineHeight":0,"btr35px":0,"bbrcolor":0,"isIndividualCorners#2A2A2A":false},"paddingtext":0,"gap":20,"verticalAlignment":"top"}"3. Metrics in MAQL start with keyword SELECT.","fontSize":18}]},{"idtype":"QyNXJhfQ4Q-rseJXEY2cMparagraph","namealign":"columncenter","children":[],"params":{"borderRadius":{"allletterSpacing":0,"btlfontFamily":0"Poppins, sans-serif","bbllineHeight":0,"btr35px":0,"bbrcolor":0,"isIndividualCorners#2A2A2A":false},"paddingtext":0,"gap":20,"verticalAlignment":"top"}"4. A simple aggregation function looks like this:","fontSize":18}]},{"idtype":"cREVlxzdFvzXHLvT-Vg-Uparagraph","namealign":"columncenter","children":[],{"paramsletterSpacing":{0,"borderRadiusfontFamily":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"JLGQLU3EQjnMwymUfv8qU","name":"columnPoppins, sans-serif","lineHeight":"35px","color":"#2A2A2A","text":"5. SELECT SUM({fact/quantity})","fontSize":18}]},{"type":"paragraph","align":"left","children":[],{"paramsletterSpacing":{0,"borderRadiusfontFamily":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"A-A7cHeG1fSbRR_p0GPcq","name":"column","children":[Poppins, sans-serif","fontSize":16,"lineHeight":"35px","color":"#2A2A2A","fontWeight":700,"text":""}]}]}]}]},"children":[],"id":"npahaaAK0AjVJfOViHrKD"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"DT7sOCKRRpj3NlKr6ZHlQQyNXJhfQ4Q-rseJXEY2cM","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}}],"params":{"layoutid":[1],"gap":10,"minHeight":200,"padding":10,"borderRadius":0}}],"name":"section"},{"params"cREVlxzdFvzXHLvT-Vg-U","name":"column","children":[],"params":{"borderRadius":{"backgroundall":"#ffffff"0,"paddingbtl":0,"gapbbl":10}0,"childrenbtr":[{0,"namebbr":"row"0,"childrenisIndividualCorners":[{"namefalse},"padding":"column"0,"childrengap":[{20,"nameverticalAlignment":"texttop"}},{"paramsid":{"valueJLGQLU3EQjnMwymUfv8qU":[{,"typename":"paragraphcolumn","children":[{],"typeparams":{"paragraphborderRadius","children":[{"fontFamilyall":"Poppins, sans-serif"0,"btl":0,"textbbl":"Write your first metric"0,"fontSizebtr":220,"letterSpacingbbr":0,"lineHeightisIndividualCorners":false},"35pxpadding":0,"colorgap":"#FF851A"}]20,"alignverticalAlignment":"centertop"}]}]},{"childrenid":[]"A-A7cHeG1fSbRR_p0GPcq","idname":"T93TUCr9mjqFiplGz0anJcolumn"},{"namechildren":"divider"[],"params":{"templateIdborderRadius":{"solid shortall":0,"colorbtl":0,"#FF851Abbl":0,"alignmentbtr":0,"centerbbr":0,"fontSizeisIndividualCorners":24false},"fontColorpadding":0,"#000000gap":20,"heightverticalAlignment":1"top"}},{"borderStyleid":"solidDT7sOCKRRpj3NlKr6ZHlQ","widthname":200}"column","children":[],"id":"Y5zs_r_fAmeBODSqYfSD4"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"centertop"}}],"idparams":{"layout":"yYJeie2RbpBPb-x5_F8T4"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl[1],"gap":10,"minHeight":200,"padding":10,"borderRadius":0}}],"name":"section"},{"params":{"background":"#ffffff","padding":0,"bblgap":010},"btrchildren":0,[{"bbrname":0"row","isIndividualCornerschildren":false},"padding[{"name":0"column","gapchildren":20,[{"verticalAlignmentname":"centertext"},"idparams":{"NVIKyeUjbOqTP3ke6mKJEvalue"},:[{"nametype":"columnparagraph","children":[]{"type":"paragraph","paramschildren":[{"borderRadiusfontFamily":{"all"Poppins, sans-serif","text":0,"btl":0"Write your first metric","bblfontSize":022,"btrletterSpacing":0,"bbrlineHeight":0,"isIndividualCorners35px":false},"paddingcolor":0,"gap#FF851A":20}],"verticalAlignmentalign":"center"}]}]},"children":[],"id":"-LNfVUJnUNZToVlOdqd5-T93TUCr9mjqFiplGz0anJ"},{"name":"columndivider","children":[],"params":{"borderRadiustemplateId":{"allsolid short":0,"btlcolor":0"#FF851A","bblalignment":0,"btrcenter":0,"bbrfontSize":024,"isIndividualCornersfontColor":false},"padding#000000":0,"gapheight":201,"verticalAlignmentborderStyle":"centersolid"},"idwidth":"JAVnqI6-539eV87iVRfEg"200},{"namechildren":[],"columnid","children":[:"Y5zs_r_fAmeBODSqYfSD4"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"hDQeiPHawMMp4C0SB4oqqyYJeie2RbpBPb-x5_F8T4"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"81EMxo0HlJ2INNJMBvMUhNVIKyeUjbOqTP3ke6mKJE"}],"params":{"layoutname":[1],"gapcolumn":100,"minHeightchildren":50[],"paddingparams":10,"borderRadius":0},"id":"-dbLS3nsBcYy34LQj-_NK"}],"name":"section","id":"vnFHvA2iO8ZWOlmlZWTio"},{"id":"NKrwOuBR063gaeGAZBHwJ","params":{"background":{"light":"#ffffff","dark":"#1d2125"{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":10}20,"childrenverticalAlignment":[{"center"},"id":"AG5FpsyJ9IoIYEhNs73mt-LNfVUJnUNZToVlOdqd5-"},{"name":"rowcolumn","children":[],"params":{"borderRadius":{"idall":0,"ddpEcFVJFwLjR6vei5LMbbtl":0,"namebbl":0,"columnbtr":0,"childrenbbr":[{0,"nameisIndividualCorners":false},"textpadding":0,"paramsgap":{20,"templateIdverticalAlignment":"simple paragraphcenter"},"value":[id":"JAVnqI6-539eV87iVRfEg"},{"typename":"paragraphcolumn","children":[],"params":{"typeborderRadius":{"paragraphall":0,"childrenbtl":[{0,"lineHeightbbl":0,"24pxbtr":0,"colorbbr":0,"#555isIndividualCorners":false},"letterSpacingpadding":0,"text":"The following examples will show you a simple progression path to building your own metrics. Each example is followed by syntax description.","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"","fontFamily":"Poppins, sans-serif","fontSize":18}],"aligngap":20,"verticalAlignment":"center"},"id":"hDQeiPHawMMp4C0SB4oqq"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},{"typeid":"paragraph81EMxo0HlJ2INNJMBvMUh"}],"childrenparams":[{"lineHeightlayout":"24px"[1],"colorgap":"#555"100,"letterSpacingminHeight":050,"text":"MAQL always works in the context of data available in a given logical data model which determines the available data and utilization of MAQL statements.","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"centerpadding":10,"borderRadius":0},"id":"-dbLS3nsBcYy34LQj-_NK"}],"name":"section","id":"vnFHvA2iO8ZWOlmlZWTio"},{"typeid":"paragraphNKrwOuBR063gaeGAZBHwJ","params":{"childrenbackground":[{"lineHeightlight":"24px#ffffff","colordark":"#555#1d2125"},"letterSpacingpadding":0,"textgap":10},"children",:[{"fontFamilyid":"Poppins, sans-serifAG5FpsyJ9IoIYEhNs73mt","fontSizename":18}]"row","alignchildren":"center"},[{"typeid":"paragraphddpEcFVJFwLjR6vei5LMb","childrenname":[{"lineHeightcolumn":,"24pxchildren",:[{"letterSpacingname":0,"text":"Example 1 - quantity","fontFamily,"params":{"templateId":"Poppins, sans-serifsimple paragraph","fontSizevalue":18,[{"colortype":"#FF851Aparagraph"}],"alignchildren":"center"},[{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"The following sample uses the SUM aggregation function on a fact (quantity) to return total all-time sales:examples will show you a simple progression path to building your own metrics. Each example is followed by syntax description.","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"},{"type":"bulleted-list","children":[{"type":"list-itemparagraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"SELECT SUM({fact/quantity})","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"}]},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"This will result in a visualization featuring a single number, total units sold, in a single rowMAQL always works in the context of data available in a given logical data model which determines the available data and utilization of MAQL statements.","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"},{"type":"paragraph","children":[{"lineHeight":"24px","letterSpacing":0,"text":"Example 2 1 - adding arithmeticcount","fontFamily":"Poppins, sans-serif","fontSize":18,"color":"#FF851A"}],"align":"center"},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"To find out what was the revenue of the total all-time sales, first multiply two facts (quantity and price) and then aggregate to the contextThe following sample uses the COUNT aggregation function on a fact (quantity) to return the count of tags associated with content:","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"},{"type":"bulleted-list","children":[{"type":"list-item","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"SELECT SUMCOUNT({fact/quantity} * {fact/pricelabel/tags.id})","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"}]},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"This will result in a visualization featuring a single number, revenue for total units sold, in a single row.","fontFamily":"Poppins, sans-serif","fontSize":18,"color":"#FF851A"}],"align":"center"},{"type":"paragraph","children":[{"lineHeight":"24px","letterSpacing":0,"text":"Example 2 - conditioning/filtering ","fontFamily":"Poppins, sans-serif","fontSize":18,"color":"#FF851A"}],"align":"center"},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"Example 3 - conditioning/filtering and reusing metricsThe following example uses the conditional statement WHERE to return a count of tasks that were completed.","fontFamily":"Poppins, sans-serif","fontSize":18}],"coloralign":"#FF851Acenter"}],{"aligntype":"centerbulleted-list"},"children":[{"type":"paragraphlist-item","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"The following example reuses the existing metric (Amount Sold) and combines it with the conditional statement WHERE defined by the Label (Color) and Label Value (Red).SELECT COUNT ({label/tasks.id}) WHERE {label/tasks.completed}= \"true\"","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"}]},{"type":"bulleted-listparagraph","childrenalign":[{"type":"list-item"center","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"SELECT {metric/amount_sold} WHERE {label/Color}=\"red\"","fontFamily":"Poppins, sans-serif","fontSize":18}],"aligntext":"center"}]},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"When constructing complex metrics, your choice of attributes and attribute values is determined by the context of available data.","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"},{"type":"paragraph","children":[{"fontSize":16,"lineHeight":"24px","color":"#555","letterSpacing":0,"fontFamily":"Open Sans, sans-serif","text":""}]}]}]},"children":[],"id":"e7eNnkqqYc9T_PTIU7A1n"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"JrLhSN6_EZ45W7mbROzU-","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"XrVPmvbXeiAO2Y10-pmUU","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"VxeCML-lvbzhdzI8ThaRQ","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"weK_K3Eb_2V3LziIUB9ib","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"ZTglsFjJrRW997aIbmSn7","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}}],"params":{"layout":[1],"gap":10,"minHeight":200,"padding":10,"borderRadius":0}}],"name":"section"},{"params":{"background":"#ffffff","padding":0,"gap":10},"children":[{"name":"row","children":[{"name":"column","children":[{"name":"text","params":{"value":[{"type":"paragraph","children":[{"type":"paragraph","children":[{"fontFamily":"Poppins, sans-serif","text":"Add Comments to Custom Metric ","fontSize":22,"letterSpacing":0,"lineHeight":"35px","color":"#FF851A"}],"align":"center"}]}]},"children":[],"id":"to_bsxFfehWB9Vz3sy7tR"},{"name":"divider","params":{"templateId":"solid short","color":"#FF851A","alignment":"center","fontSize":24,"fontColor":"#000000","height":1,"borderStyle":"solid","width":200},"children":[],"id":"KKt_P0E2R7mt8AS8ZBbmA"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"MTQ1X1psFknZcB8fBvJB_"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"Xdr_SwExHX8xojiH-p-ax"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"StO-CSsKbayCJTU9wT1Sp"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"zyvcvvSeMzPyLjM2y93JL"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"NI11SL9rs1uqV1BWCF0hh"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"K9rNxhI4Fcp3CzSS9uSTD"}],"params":{"layout":[1],"gap":100,"minHeight":50,"padding":10,"borderRadius":0},"id":"r-J7n6YWF78GUTk5ZxYB2"}],"name":"section","id":"CssLKqd9YAyYgwEMgDFy7"},{"id":"gdvnFnxrrUGT5HraJ1tT7","params":{"background":{"light":"#ffffff","dark":"#1d2125"},"padding":0,"gap":10},"children":[{"id":"GsxbucKVyh3x5yh9bHmkc","name":"row","children":[{"id":"Ylf6VE6SqvrIdaex0mqLt","name":"column","children":[{"name":"text","params":{"templateId":"simple paragraph","value":[{"type":"paragraph","children":[{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"text":"You can add comments to your customized metric by including the # symbol.","fontFamily":"Poppins, sans-serif","fontSize":18}],"align":"center"},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"fontFamily":"Poppins, sans-serif","text":"","fontWeight":700,"fontSize":18}],"align":"center"},{"type":"paragraph","children":[{"lineHeight":"24px","letterSpacing":0,"fontFamily":"Poppins, sans-serif","text":"Syntax ","fontSize":18,"color":"#FF851A"}],"align":"center"},{"type":"bulleted-list","children":[{"type":"list-item","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"fontFamily":"Poppins, sans-serif","text":"SELECT {metric/amount_sold} # this is a comment","fontSize":18}],"align":"center"}]},{"type":"paragraph","children":[{"lineHeight":"24px","color":"#555","letterSpacing":0,"fontFamily":"Poppins, sans-serif","text":"Anything after the hash sign # is ignored during computation. If you need multiline comments, each line must start with a #.","fontSize":18}],"align":"center"},{"type":"paragraph","children":[{"fontSize":16,"lineHeight":"24px","color":"#555","letterSpacing":0,"fontFamily":"Open Sans, sans-serif","text":""}]}]}]},"children":[],"id":"y3ScFnrCpFMOObmLYulOe"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"9JL3NClLY1PKOZu2ag_TX","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"ArFPwwyS1gZOKRgUK_5GT","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"sUUReynsHr97_vTPM2qCV","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"-xvsnncTJHgSrCwH-7NHg","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}},{"id":"oOGL8u0T2br1ZQm7Obbj4","name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"top"}}],"params":{"layout":[1],"gap":10,"minHeight":200,"padding":10,"borderRadius":0}}],"name":"section"},{"children":[{"params":{"layout":[1],"gap":10,"minHeight":200,"padding":10,"borderRadius":0},"children":[{"children":[{"params":{"isMediaFullSize":true,"background":"#0CAF9Ed1","gap":10,"imagePosition":"center center","hover":"none","boxShadows":[{"spread":-3,"y":0,"blur":15,"color":"#00000019"},{"y":4,"color":"#00000019","blur":6,"spread":-4}],"borderRadius":{"bbr":0,"isIndividualCorners":false,"btl":0,"all":0,"btr":0,"bbl":0},"image":{"value":"att456720389","target":"_blank","type":"attachment"},"padding":40,"link":{"value":"https://www.gooddata.com/docs/cloud/create-metrics/maql/","target":"_blank","type":"link"}},"name":"card","children":[{"name":"text","children":[],"params":{"value":[{"type":"paragraph","children":[{"type":"paragraph","children":[{"text":"PLEASE NOTE:","fontFamily":"Poppins, sans-serif","color":"#f5f5f5","fontWeight":400,"fontSize":22}],"align":"center"}]}]},"id":"_rYx9iMWJUrwkHdnUH7na"},{"name":"text","children":[],"params":{"value":[{"type":"paragraph","children":[{"type":"paragraph","children":[{"type":"paragraph","children":[{"text":"Click here to learn more about MAQL.","letterSpacing":0,"fontFamily":"Poppins, sans-serif","color":"#F5F5f5","fontSize":18}],"align":"center"}]}]}]},"id":"X5hkWKJKSe7OEnN7QpQsM"},{"name":"spacer","children":[],"params":{"space":10},"id":"ECadjya3SD4sw_uc3qeKa"}],"id":"CZTDis8vojNi-9zoJaBHg"}],"params":{"verticalAlignment":"top","gap":20,"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0},"name":"column","id":"MIcIC-knf7zaM8WwMq6t-"},{"name":"column","children":[],"params":{"padding":0,"gap":20,"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"verticalAlignment":"top"},"id":"PHF9SfYDyNBU_dZb6FHZE"},{"name":"column","children":[],"params":{"verticalAlignment":"top","borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20},"id":"viKEWyM-LJmvrzdiJyJr-"},{"name":"column","children":[],"params":{"verticalAlignment":"top","borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20},"id":"xI5LaPRpDTp6GmhLRYP0y"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"verticalAlignment":"top","gap":20,"padding":0},"id":"hO3pSGBw57H1clYJ1_1O1"},{"params":{"gap":20,"padding":0,"verticalAlignment":"top","borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false}},"children":[],"name":"column","id":"89zDGPuVeTIZUnGdJWaax"}],"name":"row","id":"TiglOu7WBY6xBpWCXurgi"}],"params":{"padding":20,"gap":10,"background":"#ffffff"},"name":"section","id":"sF8hzGtYLi8AoO1TRZi60"},{"id":"_A9myX97Ox7xCvV1PB7u9","params":{"background":{"light":"#ffffff","dark":"#1d2125"},"padding":0,"gap":10},"children":[],"name":"section"},{"params":{"background":"#0000","padding":20,"gap":10,"image":{"value":"att456720389","target":"_blank","type":"attachment"}},"children":[{"name":"row","children":[{"name":"column","children":[{"name":"divider","params":{"color":"#E6AC00","alignment":"center","fontSize":24,"fontColor":"#000000","height":3,"borderStyle":"solid","width":100},"children":[],"id":"cPIScvl9bjNSVDmZjRDQF"},{"name":"button","params":{"templateId":"regular button","label":"Return to homepage","size":"medium","shape":"circular","alignment":"center","states":{"idle":{"colors":{"background":"#E6AC00","label":"#ffffff"}},"hover":{"colors":{}}},"link":{"value":"https://learnamp.atlassian.net/wiki/spaces/KB/overview","target":"_blank","type":"link"}},"children":[],"id":"IUM9y4FeuA2BUzuChIudA"}],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":10,"verticalAlignment":"center"},"id":"mpzXCwGBJLLkvPDttm0x8"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"vu7rNAebatZsO9XraCxYg"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"-CSpEsuk3P2R8YfttaX0L"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"78OWCBEkh7RJSmfKYEwtw"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"jhEHhOJOV9ZcSl4Bl3eeH"},{"name":"column","children":[],"params":{"borderRadius":{"all":0,"btl":0,"bbl":0,"btr":0,"bbr":0,"isIndividualCorners":false},"padding":0,"gap":20,"verticalAlignment":"center"},"id":"AtCq5j-4QjUTr_GWsAGX7"}],"params":{"layout":[1],"gap":45,"minHeight":200,"padding":10,"borderRadius":0},"id":"J_8J4KJ3P5cNRiCysXTMG"}],"name":"section","id":"i6ZukE-HStuy-s-cyn6NE"}]} |
---|
|