SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette

Affiliate program v telco segmentu
Affiliate program v telco segmentuAffiliate program v telco segmentu
Affiliate program v telco segmentu
Colpirio.com s.r.o.
 
Nabil Malik - Security performance metrics
Nabil Malik - Security performance metricsNabil Malik - Security performance metrics
Nabil Malik - Security performance metrics
nooralmousa
 
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
BrightEdge Technologies
 

En vedette (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
 

Similaire à in10: How to build a metric in a metric

Kessan 1708682945115077
Kessan 1708682945115077Kessan 1708682945115077
Kessan 1708682945115077
yoshikawa0521
 
Analysis Samples
Analysis SamplesAnalysis Samples
Analysis Samples
chuckullan
 
FifthThird 3Q08 Release_Final
FifthThird 3Q08 Release_FinalFifthThird 3Q08 Release_Final
FifthThird 3Q08 Release_Final
finance28
 
FifthThird3Q08Release_Final
FifthThird3Q08Release_FinalFifthThird3Q08Release_Final
FifthThird3Q08Release_Final
finance28
 
Living on a budget answer sheet
Living on a budget answer sheetLiving on a budget answer sheet
Living on a budget answer sheet
NAFCareerAcads
 
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
Yuri Martemianov
 

Similaire à 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
 

Plus de 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
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

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