SlideShare a Scribd company logo
in
     How to build
10   a metric in a metric

     Using BY in MAQL




            with Petr Olmer, GoodData Evangelist
What is a metric in a metric?

example 1: average monthly revenue
                                                              There are aggregations
    average from monthly numbers               outer level
                                                                  on two levels.
              total revenue
                                               inner level (by month)
             for each month




example 2: average number of new leads in a quarter

   average from quarterly numbers                           In most cases,
                                                    the aggregations are different.
          number of new leads
            for each quarter                                  Exception:
                                                         average of averages.
GoodData in10 with Petr Olmer: How to build a metric in a metric                       2
Solution

average monthly revenue

    average from monthly numbers                        Average Monthly Revenue:
                                                        SELECT AVG(Monthly Revenue)
              total revenue
             for each month                             Monthly Revenue:
                                                        SELECT SUM(Revenue) BY Close Month/Year




average number of new leads in a quarter

   average from quarterly numbers                       Average Quarterly Leads:
                                                        SELECT AVG(Quarterly Leads)
          number of new leads
            for each quarter                            Quarterly Leads:
                                                        SELECT COUNT(Lead) BY Created Quarter/Year


GoodData in10 with Petr Olmer: How to build a metric in a metric                                     3
Solution in detail

Average Monthly Revenue:
SELECT AVG(Monthly Revenue)
 Outer metric is an aggregation of the inner metric.


Monthly Revenue:
SELECT SUM(Revenue) BY Close Month/Year
Inner metric uses BY to define the aggregation level.


GoodData in10 with Petr Olmer: How to build a metric in a metric   4
Why BY?

You need to define the border between the inner aggregation and the outer one.


                 inner SUM                                         outer AVG

                                                 BY Month



      Without BY, the inner SUM would not know
     where to stop and hand over to the outer AVG.



GoodData in10 with Petr Olmer: How to build a metric in a metric                5
Behind the scenes



                 inner SUM                                           outer AVG

                                                 BY Month

                                              Nov 2010       $450K
                                              Dec 2010       $580K
                                               Jan 2011      $320K               $400K
                                              Feb 2011       $360K
                                             March 2011      $430K
                                              April 2011     $260K
                                                                                  your
    datamart                             behind the scenes                       report


GoodData in10 with Petr Olmer: How to build a metric in a metric                          6
Behind the scenes

                                  You’ve asked for one number and that’s what you get:
                                                            Average monthly revenue



The monthly report is computed but you cannot see it.




                                              Nov 2010       $450K
                                              Dec 2010       $580K
                                               Jan 2011      $320K         $400K
                                              Feb 2011       $360K
                                             March 2011      $430K
                                              April 2011     $260K
                                                                           your
    datamart                       report behind the scenes               report


GoodData in10 with Petr Olmer: How to build a metric in a metric                         7
Automatic (in-report) BY

You don’t need to use BY when the attribute is in the report.

    Month/Year          Revenue        Monthly Revenue      Revenue:
     Nov 2010               $450K           $450K           SELECT SUM(Revenue)
     Dec 2010               $580K           $580K
     Jan 2011               $320K           $320K           Monthly Revenue:
     Feb 2011               $360K           $360K           SELECT SUM(Revenue) BY Month/Year
    March 2011              $430K           $430K
     April 2011             $260K           $260K



             automatic BY
                                         Both metrics return the same numbers
                                       because Month/Year attribute is in the report.


    BY says: Include this attribute in the
    computation. But it’s already there!


GoodData in10 with Petr Olmer: How to build a metric in a metric                                8
BY and BY

You can include more than one attribute in the BY clause.

    SELECT SUM(Revenue) BY Month/Year, Department
    It will return a number for each month and department.

You can have a metric in a metric in a metric in a...
Best Region Leads:                                                 one number only

SELECT MAX(Average Monthly/Region Leads)
Average Monthly/Region Leads:        one number for each region
SELECT AVG(Month/Region Leads) BY Region
Month/Region Leads:          one number for each month and region
SELECT COUNT(Lead) BY Month/Year, Region
GoodData in10 with Petr Olmer: How to build a metric in a metric                     9
Off you go...

Find the border.

                              average from region numbers

                                        total revenue
                                       for each region




Put BY into the inner metric.
                         SELECT SUM(Revenue) BY Region




GoodData in10 with Petr Olmer: How to build a metric in a metric   10

More Related Content

Viewers also liked

Affiliate program v telco segmentu
Affiliate program v telco segmentuAffiliate program v telco segmentu
Affiliate program v telco segmentuColpirio.com s.r.o.
 
Nabil Malik - Security performance metrics
Nabil Malik - Security performance metricsNabil Malik - Security performance metrics
Nabil Malik - Security performance metricsnooralmousa
 
Measuring Effectiveness
Measuring EffectivenessMeasuring Effectiveness
Measuring Effectiveness
National Arts Strategies
 
Helpdesk
HelpdeskHelpdesk
Helpdesk
shishir.jain
 
Metrics & Analytics That Matter - Steve Krull, CEO, Be Found Online
Metrics & Analytics That Matter - Steve Krull, CEO, Be Found OnlineMetrics & Analytics That Matter - Steve Krull, CEO, Be Found Online
Metrics & Analytics That Matter - Steve Krull, CEO, Be Found OnlineBrightEdge Technologies
 
Lean Workbench For Creating And Tracking Metrics That Matter
Lean Workbench For Creating And Tracking Metrics That MatterLean Workbench For Creating And Tracking Metrics That Matter
Lean Workbench For Creating And Tracking Metrics That Matter
Jennifer Rubinovitz
 
DataPower Operations Dashboard
DataPower Operations DashboardDataPower Operations Dashboard
DataPower Operations Dashboard
IBM Integration
 
Action Trumps Everything
Action Trumps EverythingAction Trumps Everything
Action Trumps Everything
InnovationAcademy_UCD
 
Analytics and Reporting: Measuring Success Along the Journey
Analytics and Reporting: Measuring Success Along the JourneyAnalytics and Reporting: Measuring Success Along the Journey
Analytics and Reporting: Measuring Success Along the Journey
Gene Begin
 
Metrics that Matter
Metrics that MatterMetrics that Matter
Metrics that Matter
Will Critchlow
 
Security Metrics Program
Security Metrics ProgramSecurity Metrics Program
Security Metrics Program
Cydney Davis
 

Viewers also liked (11)

Affiliate program v telco segmentu
Affiliate program v telco segmentuAffiliate program v telco segmentu
Affiliate program v telco segmentu
 
Nabil Malik - Security performance metrics
Nabil Malik - Security performance metricsNabil Malik - Security performance metrics
Nabil Malik - Security performance metrics
 
Measuring Effectiveness
Measuring EffectivenessMeasuring Effectiveness
Measuring Effectiveness
 
Helpdesk
HelpdeskHelpdesk
Helpdesk
 
Metrics & Analytics That Matter - Steve Krull, CEO, Be Found Online
Metrics & Analytics That Matter - Steve Krull, CEO, Be Found OnlineMetrics & Analytics That Matter - Steve Krull, CEO, Be Found Online
Metrics & Analytics That Matter - Steve Krull, CEO, Be Found Online
 
Lean Workbench For Creating And Tracking Metrics That Matter
Lean Workbench For Creating And Tracking Metrics That MatterLean Workbench For Creating And Tracking Metrics That Matter
Lean Workbench For Creating And Tracking Metrics That Matter
 
DataPower Operations Dashboard
DataPower Operations DashboardDataPower Operations Dashboard
DataPower Operations Dashboard
 
Action Trumps Everything
Action Trumps EverythingAction Trumps Everything
Action Trumps Everything
 
Analytics and Reporting: Measuring Success Along the Journey
Analytics and Reporting: Measuring Success Along the JourneyAnalytics and Reporting: Measuring Success Along the Journey
Analytics and Reporting: Measuring Success Along the Journey
 
Metrics that Matter
Metrics that MatterMetrics that Matter
Metrics that Matter
 
Security Metrics Program
Security Metrics ProgramSecurity Metrics Program
Security Metrics Program
 

Similar to in10: How to build a metric in a metric

Kessan 1708682945115077
Kessan 1708682945115077Kessan 1708682945115077
Kessan 1708682945115077yoshikawa0521
 
Analysis Samples
Analysis SamplesAnalysis Samples
Analysis Sampleschuckullan
 
3 Red Shells Wireless Program Audit - Sample
3 Red Shells Wireless Program Audit - Sample3 Red Shells Wireless Program Audit - Sample
3 Red Shells Wireless Program Audit - Sample
3 Red Shells
 
Busn 5200 managerial finance complete class
Busn 5200 managerial finance complete classBusn 5200 managerial finance complete class
Busn 5200 managerial finance complete class
Walter Bartlett
 
FifthThird 3Q08 Release_Final
FifthThird 3Q08 Release_FinalFifthThird 3Q08 Release_Final
FifthThird 3Q08 Release_Finalfinance28
 
FifthThird3Q08Release_Final
FifthThird3Q08Release_FinalFifthThird3Q08Release_Final
FifthThird3Q08Release_Finalfinance28
 
Adobe Q4 and FY2008 earnings release
Adobe Q4 and FY2008 earnings releaseAdobe Q4 and FY2008 earnings release
Adobe Q4 and FY2008 earnings release
earningsreport
 
Yelp q4 2014 earnings slides
Yelp q4 2014 earnings slidesYelp q4 2014 earnings slides
Yelp q4 2014 earnings slides
vikas0707
 
Dashboards By Function Powerpoint Presentation Slides
Dashboards By Function Powerpoint Presentation SlidesDashboards By Function Powerpoint Presentation Slides
Dashboards By Function Powerpoint Presentation Slides
SlideTeam
 
The blackstone group quarterly reports
The blackstone group quarterly reportsThe blackstone group quarterly reports
The blackstone group quarterly reports
rynbouc
 
Power BI Touche(Point of Sale )
Power BI Touche(Point of Sale )Power BI Touche(Point of Sale )
Power BI Touche(Point of Sale )
Vipinder Panchal
 
Living on a budget answer sheet
Living on a budget answer sheetLiving on a budget answer sheet
Living on a budget answer sheetNAFCareerAcads
 
Predictive automated margin trading technology part 3
Predictive automated margin trading technology part 3Predictive automated margin trading technology part 3
Predictive automated margin trading technology part 3Yuri Martemianov
 
"Driving SaaS Success Using Key Metrics" at SaaStr Annual 2016
"Driving SaaS Success Using Key Metrics" at SaaStr Annual 2016"Driving SaaS Success Using Key Metrics" at SaaStr Annual 2016
"Driving SaaS Success Using Key Metrics" at SaaStr Annual 2016
saastr
 
Rpgj March10
Rpgj March10Rpgj March10
Rpgj March10
Neil Ward
 
Belajar SQL
Belajar SQLBelajar SQL
Belajar SQL
PriscyliaKirojan2
 
Mythbusters for 360 short
Mythbusters for 360 shortMythbusters for 360 short
Mythbusters for 360 short
WWF-Australia
 

Similar to in10: How to build a metric in a metric (20)

Kessan 1708682945115077
Kessan 1708682945115077Kessan 1708682945115077
Kessan 1708682945115077
 
Analysis Samples
Analysis SamplesAnalysis Samples
Analysis Samples
 
3 Red Shells Wireless Program Audit - Sample
3 Red Shells Wireless Program Audit - Sample3 Red Shells Wireless Program Audit - Sample
3 Red Shells Wireless Program Audit - Sample
 
CiaB_Presentation
CiaB_PresentationCiaB_Presentation
CiaB_Presentation
 
Busn 5200 managerial finance complete class
Busn 5200 managerial finance complete classBusn 5200 managerial finance complete class
Busn 5200 managerial finance complete class
 
FifthThird 3Q08 Release_Final
FifthThird 3Q08 Release_FinalFifthThird 3Q08 Release_Final
FifthThird 3Q08 Release_Final
 
FifthThird3Q08Release_Final
FifthThird3Q08Release_FinalFifthThird3Q08Release_Final
FifthThird3Q08Release_Final
 
Adobe Q4 and FY2008 earnings release
Adobe Q4 and FY2008 earnings releaseAdobe Q4 and FY2008 earnings release
Adobe Q4 and FY2008 earnings release
 
KMSFeedback Example DEC 2015
KMSFeedback Example DEC 2015KMSFeedback Example DEC 2015
KMSFeedback Example DEC 2015
 
Yelp q4 2014 earnings slides
Yelp q4 2014 earnings slidesYelp q4 2014 earnings slides
Yelp q4 2014 earnings slides
 
Dashboards By Function Powerpoint Presentation Slides
Dashboards By Function Powerpoint Presentation SlidesDashboards By Function Powerpoint Presentation Slides
Dashboards By Function Powerpoint Presentation Slides
 
Budgeting
BudgetingBudgeting
Budgeting
 
The blackstone group quarterly reports
The blackstone group quarterly reportsThe blackstone group quarterly reports
The blackstone group quarterly reports
 
Power BI Touche(Point of Sale )
Power BI Touche(Point of Sale )Power BI Touche(Point of Sale )
Power BI Touche(Point of Sale )
 
Living on a budget answer sheet
Living on a budget answer sheetLiving on a budget answer sheet
Living on a budget answer sheet
 
Predictive automated margin trading technology part 3
Predictive automated margin trading technology part 3Predictive automated margin trading technology part 3
Predictive automated margin trading technology part 3
 
"Driving SaaS Success Using Key Metrics" at SaaStr Annual 2016
"Driving SaaS Success Using Key Metrics" at SaaStr Annual 2016"Driving SaaS Success Using Key Metrics" at SaaStr Annual 2016
"Driving SaaS Success Using Key Metrics" at SaaStr Annual 2016
 
Rpgj March10
Rpgj March10Rpgj March10
Rpgj March10
 
Belajar SQL
Belajar SQLBelajar SQL
Belajar SQL
 
Mythbusters for 360 short
Mythbusters for 360 shortMythbusters for 360 short
Mythbusters for 360 short
 

More from Petr Olmer

The World Through The Lens Of A Two-Year-Old
The World Through The Lens Of A Two-Year-OldThe World Through The Lens Of A Two-Year-Old
The World Through The Lens Of A Two-Year-Old
Petr Olmer
 
How to scale (with Big Data)
How to scale (with Big Data)How to scale (with Big Data)
How to scale (with Big Data)
Petr Olmer
 
Do Ameriky (WebExpo Prague 2012)
Do Ameriky (WebExpo Prague 2012)Do Ameriky (WebExpo Prague 2012)
Do Ameriky (WebExpo Prague 2012)
Petr Olmer
 
Embed GoodData Analytics in Your Force.com App
Embed GoodData Analytics in Your Force.com AppEmbed GoodData Analytics in Your Force.com App
Embed GoodData Analytics in Your Force.com App
Petr Olmer
 
in10: How to start with GoodData for Salesforce
in10: How to start with GoodData for Salesforcein10: How to start with GoodData for Salesforce
in10: How to start with GoodData for Salesforce
Petr Olmer
 
Business Intelligence Platform as a Service: Introduction to GoodData
Business Intelligence Platform as a Service: Introduction to GoodDataBusiness Intelligence Platform as a Service: Introduction to GoodData
Business Intelligence Platform as a Service: Introduction to GoodData
Petr Olmer
 

More from Petr Olmer (6)

The World Through The Lens Of A Two-Year-Old
The World Through The Lens Of A Two-Year-OldThe World Through The Lens Of A Two-Year-Old
The World Through The Lens Of A Two-Year-Old
 
How to scale (with Big Data)
How to scale (with Big Data)How to scale (with Big Data)
How to scale (with Big Data)
 
Do Ameriky (WebExpo Prague 2012)
Do Ameriky (WebExpo Prague 2012)Do Ameriky (WebExpo Prague 2012)
Do Ameriky (WebExpo Prague 2012)
 
Embed GoodData Analytics in Your Force.com App
Embed GoodData Analytics in Your Force.com AppEmbed GoodData Analytics in Your Force.com App
Embed GoodData Analytics in Your Force.com App
 
in10: How to start with GoodData for Salesforce
in10: How to start with GoodData for Salesforcein10: How to start with GoodData for Salesforce
in10: How to start with GoodData for Salesforce
 
Business Intelligence Platform as a Service: Introduction to GoodData
Business Intelligence Platform as a Service: Introduction to GoodDataBusiness Intelligence Platform as a Service: Introduction to GoodData
Business Intelligence Platform as a Service: Introduction to GoodData
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

in10: How to build a metric in a metric

  • 1. in How to build 10 a metric in a metric Using BY in MAQL with Petr Olmer, GoodData Evangelist
  • 2. What is a metric in a metric? example 1: average monthly revenue There are aggregations average from monthly numbers outer level on two levels. total revenue inner level (by month) for each month example 2: average number of new leads in a quarter average from quarterly numbers In most cases, the aggregations are different. number of new leads for each quarter Exception: average of averages. GoodData in10 with Petr Olmer: How to build a metric in a metric 2
  • 3. Solution average monthly revenue average from monthly numbers Average Monthly Revenue: SELECT AVG(Monthly Revenue) total revenue for each month Monthly Revenue: SELECT SUM(Revenue) BY Close Month/Year average number of new leads in a quarter average from quarterly numbers Average Quarterly Leads: SELECT AVG(Quarterly Leads) number of new leads for each quarter Quarterly Leads: SELECT COUNT(Lead) BY Created Quarter/Year GoodData in10 with Petr Olmer: How to build a metric in a metric 3
  • 4. Solution in detail Average Monthly Revenue: SELECT AVG(Monthly Revenue) Outer metric is an aggregation of the inner metric. Monthly Revenue: SELECT SUM(Revenue) BY Close Month/Year Inner metric uses BY to define the aggregation level. GoodData in10 with Petr Olmer: How to build a metric in a metric 4
  • 5. Why BY? You need to define the border between the inner aggregation and the outer one. inner SUM outer AVG BY Month Without BY, the inner SUM would not know where to stop and hand over to the outer AVG. GoodData in10 with Petr Olmer: How to build a metric in a metric 5
  • 6. Behind the scenes inner SUM outer AVG BY Month Nov 2010 $450K Dec 2010 $580K Jan 2011 $320K $400K Feb 2011 $360K March 2011 $430K April 2011 $260K your datamart behind the scenes report GoodData in10 with Petr Olmer: How to build a metric in a metric 6
  • 7. Behind the scenes You’ve asked for one number and that’s what you get: Average monthly revenue The monthly report is computed but you cannot see it. Nov 2010 $450K Dec 2010 $580K Jan 2011 $320K $400K Feb 2011 $360K March 2011 $430K April 2011 $260K your datamart report behind the scenes report GoodData in10 with Petr Olmer: How to build a metric in a metric 7
  • 8. Automatic (in-report) BY You don’t need to use BY when the attribute is in the report. Month/Year Revenue Monthly Revenue Revenue: Nov 2010 $450K $450K SELECT SUM(Revenue) Dec 2010 $580K $580K Jan 2011 $320K $320K Monthly Revenue: Feb 2011 $360K $360K SELECT SUM(Revenue) BY Month/Year March 2011 $430K $430K April 2011 $260K $260K automatic BY Both metrics return the same numbers because Month/Year attribute is in the report. BY says: Include this attribute in the computation. But it’s already there! GoodData in10 with Petr Olmer: How to build a metric in a metric 8
  • 9. BY and BY You can include more than one attribute in the BY clause. SELECT SUM(Revenue) BY Month/Year, Department It will return a number for each month and department. You can have a metric in a metric in a metric in a... Best Region Leads: one number only SELECT MAX(Average Monthly/Region Leads) Average Monthly/Region Leads: one number for each region SELECT AVG(Month/Region Leads) BY Region Month/Region Leads: one number for each month and region SELECT COUNT(Lead) BY Month/Year, Region GoodData in10 with Petr Olmer: How to build a metric in a metric 9
  • 10. Off you go... Find the border. average from region numbers total revenue for each region Put BY into the inner metric. SELECT SUM(Revenue) BY Region GoodData in10 with Petr Olmer: How to build a metric in a metric 10