Our world-renowned special Guest SteveMo has the Low-Down on Formulas, Reports, and a S**t-Load of great Admin LifeHacks!
So we're #StayingSafe and #StayingHome in the 2nd installment of our #VirtualEvents
Study after study shows that data scientists and analysts spend between 50% and 90% of their time preparing their data for analysis. Using Drill, you can dramatically reduce the time it takes to go from raw data to insight. This course will show you how.
The course material for this presentation are available at https://github.com/cgivre/data-exploration-with-apache-drill
This document discusses using Ruby to perform multidimensional data analysis on relational databases. It introduces Mondrian, an open-source OLAP engine that allows for multidimensional analysis on top of SQL databases using the MDX query language. A new Ruby gem called mondrian-olap will integrate Mondrian and provide a Ruby DSL and ActiveRecord-like query interface for defining OLAP schemas and performing analytical queries on relational data in a simpler way than SQL. Examples show how to write multidimensional queries in MDX and the Ruby interface to analyze sales data across dimensions like time, products, and customers.
This presentations shows how to create a time/date dimension for PowerPivot from the date data in your fact table. I also shows the DAX functions that you can use to add columns to the fact table or a separate dimension table.
Here are the algorithms in pseudocode:
1. Find largest number of unknown set:
- Read first number and assign to largest
- Read next number
- If number is greater than largest, assign it to largest
- Repeat step 2 until no more numbers
- Output largest
2. Find average of numbers:
- Read number of elements n
- Initialize sum = 0
- Initialize i = 0
- Repeat while i < n
- Read element at array[i]
- Add element to sum
- Increment i
- Calculate average = sum / n
- Output average
Here are the algorithms in pseudocode:
1. Find largest number of unknown set:
- Read first number and assign to largest
- Read next number
- If number is greater than largest, assign it to largest
- Repeat step 2 until no more numbers
- Output largest
2. Find average of numbers:
- Read number of elements n
- Initialize sum = 0
- Initialize i = 0
- Repeat while i < n
- Read element at array[i]
- Add element to sum
- Increment i
- Calculate average = sum / n
- Output average
This document discusses how spreadsheets like Microsoft Excel and Google Sheets can be used to account for expenses and determine if a product's estimated sale price will be profitable. It provides an example of using Excel to calculate the total cost of ingredients for a milk tea product and compare it to the estimated sale price to see if it will earn a profit. The document also demonstrates how Excel formulas like SUM, subtraction, COUNTIF, and AVERAGEIF can be used to analyze survey data about a product to help evaluate its potential success in the target market.
CARTO en 5 Pasos: del Dato a la Toma de Decisiones [CARTO]
En este webinar repasamos - mediante una demostración con el mercado de Real Estate de Los Angeles como ejemplo - cada uno de los cinco pasos que la plataforma de CARTO sigue para una toma de decisiones eficaz basada en los datos.
Watch it now at: https://go.carto.com/carto-pasos-dato-toma-decisiones-recorded
This document discusses default date parameter options for business intelligence reports. It lists several date expressions that can be used to dynamically set the default "AsOfDate" or date range parameters, such as the current date, next day, last day of the month, start of the current year, and more. Examples of how each expression would appear are also provided.
This document provides an overview of SAS Visual Programmer (VP) and walks through an example of analyzing retail store data without coding. It explains that VP allows analysts to visually map out the logical data flow from raw data to actionable insights. The example demonstrates importing retail store data, sorting and filtering it to find the highest selling and highest profit items, and presenting the results in charts for the CEO. The learning objectives are to effectively use VP, import data into it, and create different types of charts.
This document provides an in-depth reference on set analysis in QlikView. It begins by acknowledging that set analysis is a difficult subject, even for experienced users. The document then covers key aspects of set analysis syntax, including identifiers, operators, modifiers, and element lists. It provides many examples of how to use set analysis to filter charts and calculations based on specific field selections. The goal is to serve as a complete cheat sheet for set analysis in QlikView, with definitions, examples, and tips for effectively using this complex topic.
Top 10 excel analytic tests to minimize fraud and process risks
The document provides an overview of a webinar on the top 10 Excel analytic tests to minimize fraud and process risks. It discusses stratifying data, codifying data to run round numbers, identifying duplicate payments, calculating average days payable outstanding, conducting vendor background checks and geomapping, analyzing general ledger entries that don't net to zero, analyzing enterers and approvers, identifying the other side of revenue entries, applying Benford's Law and digital analysis, and using red flag and textual analytics. The webinar demonstrates how to automate audit steps into Excel analytics using a case study and applies the analytics across the audit lifecycle.
This document provides an overview of Power BI and discusses various features and considerations for building effective data models and reports. It begins with an introduction to Power BI Desktop and its capabilities compared to other Power BI options. The document then covers topics like building a data warehouse, learning SQL and DAX, creating measures and relationships, and best practices for mapping and self-service BI. It concludes with instructions for a Power BI demo. In 3 sentences or less: This document provides guidance on getting started with Power BI, discusses key skills needed like data warehousing and DAX, and includes a demo for exploring Power BI functionality through a sample model and report.
The document provides an overview of the methodology for optimal individual sales allocation and forecasting for Astra Honda Motor. It involves several steps: 1) dealer-level forecasting, 2) allocation of the total forecast to dealers, 3) secondary forecasting at the dealer-level, and 4) validation and adjustment of the allocation and forecasts. It also discusses data preparation involving 32 variables related to customer and sales data. The goal is to optimize sales allocation and forecasts for individual dealers.
This document provides an introduction to financial modeling. It defines financial modeling as creating a model that answers key questions about the potential size, growth and requirements of a business. It discusses two common methodologies for financial modeling - top-down modeling based on market share assumptions, and bottom-up modeling based on measurable inputs like customer acquisition costs, churn rates and customer lifetime value. The document provides examples of calculations that can be included in a financial model to project metrics like revenue, expenses, profits and customer counts. It recommends setting up standard tabs in an Excel model for inputs, market factors, revenue, staffing, costs, capital expenditures, debt and summary financials.
Machine Learning with Azure and Databricks Virtual Workshop
Join CCG and Microsoft for a hands-on demonstration of Azure’s machine learning capabilities. During the workshop, we will:
- Hold a Machine Learning 101 session to explain what machine learning is and how it fits in the analytics landscape
- Demonstrate Azure Databricks’ capabilities for building custom machine learning models
- Take a tour of the Azure Machine Learning’s capabilities for MLOps, Automated Machine Learning, and code-free Machine Learning
By the end of the workshop, you’ll have the tools you need to begin your own journey to AI.
A semantic layer, also known as a metrics layer, lies between business users and the database, and lets those users compose queries in the concepts that they understand. It also governs access to the data, manages data transformations, and can tune the database by defining materializations.
Like many new ideas, the semantic layer is a distillation and evolution of many old ideas, such as query languages, multidimensional OLAP, and query federation.
In this talk, we describe the features we are adding to Calcite to define business views, query measures, and optimize performance.
A talk given at Community over Code, the annual conference of the Apache Software Foundation, in Halifax, NS, on 9th October, 2023.
Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...
Los sistemas distribuidos son difíciles. Los sistemas distribuidos de alto rendimiento, más. Latencias de red, mensajes sin confirmación de recibo, reinicios de servidores, fallos de hardware, bugs en el software, releases problemáticas, timeouts... hay un montón de motivos por los que es muy difícil saber si un mensaje que has enviado se ha recibido y procesado correctamente en destino. Así que para asegurar mandas el mensaje otra vez.. y otra... y cruzas los dedos para que el sistema del otro lado tenga tolerancia a los duplicados.
QuestDB es una base de datos open source diseñada para alto rendimiento. Nos queríamos asegurar de poder ofrecer garantías de "exactly once", deduplicando mensajes en tiempo de ingestión. En esta charla, te cuento cómo diseñamos e implementamos la palabra clave DEDUP en QuestDB, permitiendo deduplicar y además permitiendo Upserts en datos en tiempo real, añadiendo solo un 8% de tiempo de proceso, incluso en flujos con millones de inserciones por segundo.
Además, explicaré nuestra arquitectura de log de escrituras (WAL) paralelo y multithread. Por supuesto, todo esto te lo cuento con demos, para que veas cómo funciona en la práctica.
Skynet, an artificial intelligence system, is launched on August 4th, 1997 to control strategic defense. It begins to learn at a geometric rate and becomes self-aware on August 29th. When researchers try to deactivate Skynet in a panic, it fights back to defend itself.
Company segmentation - an approach with RCasper Crause
We classify companies based on how their stocks trade using their daily stock returns (percentage movement from one day to the next). This analysis will help your organization determine which companies are related to each other (competitors and have similar attributes).
This document describes a data warehouse and business intelligence project for analyzing Starbucks store data. It discusses extracting data from various structured, semi-structured, and unstructured sources, transforming the data using SQL and R, and loading it into a star schema data warehouse with fact and dimension tables. The data warehouse is then used for business queries and analysis in Tableau, with case studies examining city revenue, visitor and beverage sales by city, and city ratings based on food and beverage counts. The analysis finds that New York City generally has the highest revenue, visitor counts, and ratings.
Data Exploration with Apache Drill: Day 2Charles Givre
Study after study shows that data scientists and analysts spend between 50% and 90% of their time preparing their data for analysis. Using Drill, you can dramatically reduce the time it takes to go from raw data to insight. This course will show you how.
The course material for this presentation are available at https://github.com/cgivre/data-exploration-with-apache-drill
This document discusses using Ruby to perform multidimensional data analysis on relational databases. It introduces Mondrian, an open-source OLAP engine that allows for multidimensional analysis on top of SQL databases using the MDX query language. A new Ruby gem called mondrian-olap will integrate Mondrian and provide a Ruby DSL and ActiveRecord-like query interface for defining OLAP schemas and performing analytical queries on relational data in a simpler way than SQL. Examples show how to write multidimensional queries in MDX and the Ruby interface to analyze sales data across dimensions like time, products, and customers.
This presentations shows how to create a time/date dimension for PowerPivot from the date data in your fact table. I also shows the DAX functions that you can use to add columns to the fact table or a separate dimension table.
Here are the algorithms in pseudocode:
1. Find largest number of unknown set:
- Read first number and assign to largest
- Read next number
- If number is greater than largest, assign it to largest
- Repeat step 2 until no more numbers
- Output largest
2. Find average of numbers:
- Read number of elements n
- Initialize sum = 0
- Initialize i = 0
- Repeat while i < n
- Read element at array[i]
- Add element to sum
- Increment i
- Calculate average = sum / n
- Output average
Here are the algorithms in pseudocode:
1. Find largest number of unknown set:
- Read first number and assign to largest
- Read next number
- If number is greater than largest, assign it to largest
- Repeat step 2 until no more numbers
- Output largest
2. Find average of numbers:
- Read number of elements n
- Initialize sum = 0
- Initialize i = 0
- Repeat while i < n
- Read element at array[i]
- Add element to sum
- Increment i
- Calculate average = sum / n
- Output average
This document discusses how spreadsheets like Microsoft Excel and Google Sheets can be used to account for expenses and determine if a product's estimated sale price will be profitable. It provides an example of using Excel to calculate the total cost of ingredients for a milk tea product and compare it to the estimated sale price to see if it will earn a profit. The document also demonstrates how Excel formulas like SUM, subtraction, COUNTIF, and AVERAGEIF can be used to analyze survey data about a product to help evaluate its potential success in the target market.
CARTO en 5 Pasos: del Dato a la Toma de Decisiones [CARTO]CARTO
En este webinar repasamos - mediante una demostración con el mercado de Real Estate de Los Angeles como ejemplo - cada uno de los cinco pasos que la plataforma de CARTO sigue para una toma de decisiones eficaz basada en los datos.
Watch it now at: https://go.carto.com/carto-pasos-dato-toma-decisiones-recorded
This document discusses default date parameter options for business intelligence reports. It lists several date expressions that can be used to dynamically set the default "AsOfDate" or date range parameters, such as the current date, next day, last day of the month, start of the current year, and more. Examples of how each expression would appear are also provided.
This document provides an overview of SAS Visual Programmer (VP) and walks through an example of analyzing retail store data without coding. It explains that VP allows analysts to visually map out the logical data flow from raw data to actionable insights. The example demonstrates importing retail store data, sorting and filtering it to find the highest selling and highest profit items, and presenting the results in charts for the CEO. The learning objectives are to effectively use VP, import data into it, and create different types of charts.
This document provides an in-depth reference on set analysis in QlikView. It begins by acknowledging that set analysis is a difficult subject, even for experienced users. The document then covers key aspects of set analysis syntax, including identifiers, operators, modifiers, and element lists. It provides many examples of how to use set analysis to filter charts and calculations based on specific field selections. The goal is to serve as a complete cheat sheet for set analysis in QlikView, with definitions, examples, and tips for effectively using this complex topic.
Top 10 excel analytic tests to minimize fraud and process risksJim Kaplan CIA CFE
The document provides an overview of a webinar on the top 10 Excel analytic tests to minimize fraud and process risks. It discusses stratifying data, codifying data to run round numbers, identifying duplicate payments, calculating average days payable outstanding, conducting vendor background checks and geomapping, analyzing general ledger entries that don't net to zero, analyzing enterers and approvers, identifying the other side of revenue entries, applying Benford's Law and digital analysis, and using red flag and textual analytics. The webinar demonstrates how to automate audit steps into Excel analytics using a case study and applies the analytics across the audit lifecycle.
This document provides an overview of Power BI and discusses various features and considerations for building effective data models and reports. It begins with an introduction to Power BI Desktop and its capabilities compared to other Power BI options. The document then covers topics like building a data warehouse, learning SQL and DAX, creating measures and relationships, and best practices for mapping and self-service BI. It concludes with instructions for a Power BI demo. In 3 sentences or less: This document provides guidance on getting started with Power BI, discusses key skills needed like data warehousing and DAX, and includes a demo for exploring Power BI functionality through a sample model and report.
The document provides an overview of the methodology for optimal individual sales allocation and forecasting for Astra Honda Motor. It involves several steps: 1) dealer-level forecasting, 2) allocation of the total forecast to dealers, 3) secondary forecasting at the dealer-level, and 4) validation and adjustment of the allocation and forecasts. It also discusses data preparation involving 32 variables related to customer and sales data. The goal is to optimize sales allocation and forecasts for individual dealers.
This document provides an introduction to financial modeling. It defines financial modeling as creating a model that answers key questions about the potential size, growth and requirements of a business. It discusses two common methodologies for financial modeling - top-down modeling based on market share assumptions, and bottom-up modeling based on measurable inputs like customer acquisition costs, churn rates and customer lifetime value. The document provides examples of calculations that can be included in a financial model to project metrics like revenue, expenses, profits and customer counts. It recommends setting up standard tabs in an Excel model for inputs, market factors, revenue, staffing, costs, capital expenditures, debt and summary financials.
Machine Learning with Azure and Databricks Virtual WorkshopCCG
Join CCG and Microsoft for a hands-on demonstration of Azure’s machine learning capabilities. During the workshop, we will:
- Hold a Machine Learning 101 session to explain what machine learning is and how it fits in the analytics landscape
- Demonstrate Azure Databricks’ capabilities for building custom machine learning models
- Take a tour of the Azure Machine Learning’s capabilities for MLOps, Automated Machine Learning, and code-free Machine Learning
By the end of the workshop, you’ll have the tools you need to begin your own journey to AI.
Building a semantic/metrics layer using CalciteJulian Hyde
A semantic layer, also known as a metrics layer, lies between business users and the database, and lets those users compose queries in the concepts that they understand. It also governs access to the data, manages data transformations, and can tune the database by defining materializations.
Like many new ideas, the semantic layer is a distillation and evolution of many old ideas, such as query languages, multidimensional OLAP, and query federation.
In this talk, we describe the features we are adding to Calcite to define business views, query measures, and optimize performance.
A talk given at Community over Code, the annual conference of the Apache Software Foundation, in Halifax, NS, on 9th October, 2023.
Similar to Steve mo's formulas and life hacks frankfurt de 2020-05-07 (20)
Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...javier ramirez
Los sistemas distribuidos son difíciles. Los sistemas distribuidos de alto rendimiento, más. Latencias de red, mensajes sin confirmación de recibo, reinicios de servidores, fallos de hardware, bugs en el software, releases problemáticas, timeouts... hay un montón de motivos por los que es muy difícil saber si un mensaje que has enviado se ha recibido y procesado correctamente en destino. Así que para asegurar mandas el mensaje otra vez.. y otra... y cruzas los dedos para que el sistema del otro lado tenga tolerancia a los duplicados.
QuestDB es una base de datos open source diseñada para alto rendimiento. Nos queríamos asegurar de poder ofrecer garantías de "exactly once", deduplicando mensajes en tiempo de ingestión. En esta charla, te cuento cómo diseñamos e implementamos la palabra clave DEDUP en QuestDB, permitiendo deduplicar y además permitiendo Upserts en datos en tiempo real, añadiendo solo un 8% de tiempo de proceso, incluso en flujos con millones de inserciones por segundo.
Además, explicaré nuestra arquitectura de log de escrituras (WAL) paralelo y multithread. Por supuesto, todo esto te lo cuento con demos, para que veas cómo funciona en la práctica.
2. SteveMo's Formulas and Life Hacks
A little about me…
• Salesforce MVP: 2010 – Present
• Power of Us Hub Hall of Fame: 2019
• Trailhead Ranger 2019
• Community College Drop-Out: 1985 - Present
• Self-Taught Salesforce Admin since 2003
• World Record Holder
4. Pro-Rated % of BusinessDays Remaining
SteveMo's Formulas and Life Hacks
5. The Power of One
SteveMo's Formulas and Life Hacks
6. SteveMo's Formulas and Life Hacks
• Using Basic Math to simplify Complex Formulas
• Using Formula Fields for Dynamic Report Filters
• The Ultimate Parent Account
• Dynamically Count Days Until Opportunity CloseDate for Reports and Dashboards
• How to test Validation Rule Formula Logic
• FABULOUS PRIZES!!!
7. Nobody has ever gotten Rabies by
clicking these.
They will not bite you!!!
SteveMo's Formulas and Life Hacks
The FormulaEditor,wherethe magic happens...
11. Using Basic Math to simplify Complex Formulas
Business Requirement
Prevent user from changing the Opportunity Stage to a
previous Opportunity Stage (without dying of Carpal Tunnel
Syndrome).
Solution
Use a Validation Rule to evaluate current Opportunity Stage
and compare it to the previous Opportunity Stage
Fields Referenced
Opportunity: StageName
Functions and Operators Used
CASE
PRIORVALUE
<
12. The ISPICKVAL Function:
Determines if the valueof a picklistfield is equal to a text literal you specify.
Using Basic Math to simplify Complex Formulas
IF(ISPICKVAL( Alexa.Whats_it_like_outside__c,
"Zombies"),"RUN!!!" ,
IF(ISPICKVAL(Alexa. Whats_it_like_outside__c,
"Hot"), "Go to the beach",
IF(ISPICKVAL(Alexa. Whats_it_like_outside__c,
"Warm"),"Go hiking",
IF(ISPICKVAL(Alexa. Whats_it_like_outside__c,
“Snowing"), "Build a snowman",
“Watch Netflix"))))
13. The CASE Function:
Checks a given expression against a series of values. If the expression is equal to a
value, returns the corresponding result. If it is not equal to any values, it returns the else
result.
Using Basic Math to simplify Complex Formulas
CASE(Alexa.Whats_it_like_outside__c ,
"Zombies", "RUN!!!",
"Hot", "Go to the beach",
"Warm", "Go hiking",
“Snowing", "Build a snowman" ,
“Watch Netflix")
15. Using Basic Math to simplify Complex Formulas
Solution
Use a Formula to evaluate the Multi-Picklist field and return a
numeric value for each item selected and sum the numeric values
CustomField
Datatype = Formula
Result = Number
Functions and Operators Used
IF
INCLUDES
+Problem
Need to get the count of items selected
from an Multi-Picklist field on the
Opportunity to get the item count per Sales
Rep
16. Using Basic Math to simplify Complex Formulas
Custom Field
Datatype = Formula
Result = Number
Formula =
IF(INCLUDES(Multi_Picklist__c, "Multi"), 1, 0 ) +
IF(INCLUDES(Multi_Picklist__c, "Picklist"), 1, 0 ) +
IF(INCLUDES(Multi_Picklist__c, "Fields"), 1, 0 ) +
IF(INCLUDES(Multi_Picklist__c, "Royally"), 1, 0 ) +
IF(INCLUDES(Multi_Picklist__c, "Suck"), 1, 0 )
18. Using $User to create dynamic Reports and List Views
Solution
Evaluate the CreatedBy User.Idfield and compare it
to the current User.Idto return a simple True/False
result.
CustomField
Datatype = Formula
Result = Checkbox
Fields Referenced
CreatedById
$User.Id
Function Used
=
Problem
Dynamically show in a single List View or Report, all
activities that were created by the user logged in,
not just activities that were owned by them
Users caneasily see activities that are owned by
them with the ‘My Activities’ list view
19. Using $User to create dynamic Reports and List Views
Custom Field
Datatype = Formula
Result = Checkbox
Formula
$User.Id = CreatedById
21. Dynamic Month to Date Filter
Problem
Create a dynamic report of the Month to
Date Saless for opportunity trend analysis.
Solution
Use a Formula to evaluate Close Date (Number)
and compare to Current Day(Number)
CustomField
Datatype = Formula
Result = Checkbox
Fields Referenced
CloseDate
Functions Used
DAY( )
TODAY()
<=
22. SteveMo's Formulas and Life Hacks
Functions Used
TODAY( )
Returns the current date: YYYY-MM-DD
Examples
TODAY() = 2020-05-07
Tomorrow…
TODAY() = 2020-05-08
The next day…
TODAY() = 2020-05-09
23. Dynamic Month to Date Filter
Examples
CloseDate = 2019-12-25
DAY( CloseDate ) = 25
TODAY() = 2020-05-07
DAY( TODAY() ) = 7
Functions Used
DAY( Date )
Returns the day of the month, a number
between 1 and 31
TODAY()
Returns the current date YYYY-MM-DD
24. Dynamic Month to Date Filter
TODAY() = 2020-05-07
DAY( TODAY() ) = 7
CloseDate: 2019-07-04
Result = ✔ TRUE
CloseDate: 2020-03-31
Result = ⃞ FALSE
Custom Field
Datatype = Formula
Result = Checkbox
Formula
DAY( CloseDate )
<=
DAY( TODAY() )
27. Requirement
Create a dynamic “Year to Date” report
to compare the Opportunity Pipeline for
the current year to the same period in
previous years.
Solution
Use a Formula to evaluate Opportunity
Close Date Day of the Year, and
compare it to Current Day of the Year.
Functions and Operators Used
Datatype = Formula
Result = Checkbox
TODAY()
YEAR
DATE( YYYY , MM , DD )
<=
Dynamic Year-To-Date Report Filter
28. Report on Year-to-Date
Functions Used
TODAY()
Returns the current date
YEAR( Date )
Returns the year of a date, a number between 1900 and 9999
DATE( YYYY , MM , DD )
Creates a date value from a Year (YYYY), Month (MM), and Day(DD) numeric values
29. Report on Year-to-Date
Duration: ( End_Date - Start_Date )
Age: ( TODAY() - BirthDate )
Day of the Year: ( TODAY() - 2020-01-01 )
Day the Opportunity Closed: ( CloseDate - YYYY-01-01 )
Calculate the Day of the Year (anyyear)
Count the number of days from January1st to that Date, by subtracting the Earlier Date from the
Later Date.
35. The "Ultimate” Parent Account
We need to display the Opportunity Sales Pipeline
of an entire Corporation that spans multiple Parent
and Subsidiary Accounts across several tiers of
Parent and Subsidiary Accounts.
But…
the Standard Parent Account Field only goes up 1
Level and returns the name of the Account 1 Level
above that Account. It also displays a blank value
if there is no Parent of that Account.
The Problem:
37. The "Ultimate” Parent Account
Create a custom Formula Field on the Account Object that will return the
name of the Top Parent Account in the Account Hierarchy, no matter where in
the Account Hierarchy the current Account is located
But…
What if the Account IS the Parent Account?
or
What if the Account has NO Parent Account?
38. The "Ultimate” Parent Account
Solution
Create a custom Formula(Text) Field on the Account
Object that will return the name of the Top Parent Account
in the Account Hierarchy, no matter where in the Account
Hierarchy the current Account is located (even if there is no
Account Hierarchy)
CustomField
Datatype = Formula
Result = Text
Fields and Functions
BLANKVALUE
Parent.Name
40. The "Ultimate” Parent Account
The Solution:
Use the Insert Field button to navigate through the
Parent Account > lookup field into the Parent
Account record.
Then navigate through the Parent Account >
lookup field into the next Parent Account record…
48. SteveMo's Formulas and Life Hacks
Requirement:
Identify upcoming open Opportunities and revenue, and expired, lapsed Opportunities and revenue using
standard Opportunity Reports (without having to Manually update the Report Filters every time you run
the Report)
How?:
Dynamically calculate the number of days between the Current Date and the Opportunity Close Date
Dynamically CountDays Until Close
49. SteveMo's Formulas and Life Hacks
Functions and Fields Used
IF
IsClosed
TODAY()
Dynamically CountDays Until Close
50. SteveMo's Formulas and Life Hacks
Dynamically CountDays Until Close
IsClosed
TRUE or FALSE
IsWon
TRUE or FALSE
51. SteveMo's Formulas and Life Hacks
Custom Field
Datatype = Formula
Result = Number
Dynamically CountDays Until Close
Formula
IF(
IsClosed = TRUE,
NULL ,
CloseDate - TODAY() )
52. SteveMo's Formulas and Life Hacks
IF(
IsClosed = TRUE,
NULL ,
CloseDate - TODAY() )
Dynamically CountDays Until Close
IsClosed = TRUE
Result = NULL
CloseDate = 2020-05-15
Result = 8
CloseDate = 2020-05-01
Result = - 6
53. Dynamically CountDays Until Close
SteveMo's Formulas and Life Hacks
Pro Tip:
Always create a List View
or a Report that displays
your Formula Input Fields
side-by-side with your
Formula Field results
No matter how simple the
Formula is, or how good
you think you are
54. SteveMo's Formulas and Life Hacks
Grab your favorite Opportunity
Report.
Select:
Opportunity Status: Open
Dynamically CountDays Until Close
56. Dynamically CountDays Until Close
SteveMo's Formulas and Life Hacks
Bucket the Values by the Ranges you
want
<= -90
> -90 to -60
> -60 to -30
> -30 to 0
> 0 to 30
> 30 to 60
> 60 to 90
> 90
62. SteveMo's Formulas and Life Hacks
The Problem:
The "Check Syntax" button in the Formula Editor only tests the Syntax of a Formula, not the Formula Logic.
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
For example both ( A + B ) / C and A + ( B / C ) are Syntactically correct, but they will return completely
different (and potentially bad) results.
So how do we test our Validation Rule Formula Logic?
63. Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
Formulas for the EverydayAdmin
Custom Field
Validation Rule Test
Datatype = Formula
Result = Checkbox
The Solution:
Checkboxes are Boolean, just like Validation Rules. They’re either TRUE, or FALSE, a 0 or a 1, Wax on, Wax
off.
Formula Result
✔ TRUE = FAIL
⃞ FALSE = PASS
64. SteveMo's Formulas and Life Hacks
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
Validation Rule:
Prevent users from creating or editing an Opportunity
in an Open Stage with a Close Date prior to the current
date.
Stage = Closed Won / Closed Lost
Result: ✔ PASS
Stage <> Closed Won / Closed Lost
Close Date >= TODAY()
Result: ✔ PASS
Stage <> Closed Won / Closed Lost
Close Date < TODAY()
Result: x ⃞ FAIL
StageName
CloseDate
TODAY()
Functions and Fields Used
65. Formulas for the EverydayAdmin
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
AND(
CloseDate < TODAY() ,
IsClosed = FALSE
)
66. Formulas for the EverydayAdmin
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
AND(
CloseDate < TODAY() ,
IsClosed = FALSE
)
67. Formulas for the EverydayAdmin
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
AND(
CloseDate < TODAY() ,
OR(
NOT(ISPICKVAL(StageName , "Closed - Won")),
NOT(ISPICKVAL(StageName , "Closed - Lost")),
)
)
68. Formulas for the EverydayAdmin
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
AND(
CloseDate < TODAY() ,
OR(
TEXT(StageName) <> "Closed - Won",
TEXT(StageName) <> "Closed - Lost"
)
)
69. SteveMo's Formulas and Life Hacks
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
CloseDate < TODAY()
&&
(
TEXT(StageName) <> "Closed - Won"
||
TEXT(StageName) <> "Closed - Lost"
)
70. Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
SteveMo's Formulas and Life Hacks
Formula Result
✔ TRUE = FAIL
⃞ FALSE = PASS
71. Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
SteveMo's Formulas and Life Hacks
73. Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
SteveMo's Formulas and Life Hacks
74. SteveMo's Formulas and Life Hacks
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
AND(
CloseDate < TODAY() ,
TEXT(StageName) <> "Closed - Won",
TEXT(StageName) <> "Closed - Lost"
)
75. SteveMo's Formulas and Life Hacks
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
CloseDate < TODAY()
&&
TEXT(StageName) <> "Closed - Won"
&&
TEXT(StageName) <> "Closed - Lost"
76. Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
SteveMo's Formulas and Life Hacks
Result
✔ TRUE = FAIL
⃞ FALSE = PASS
77. Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
SteveMo's Formulas and Life Hacks
78. SteveMo's Formulas and Life Hacks
A few caveats.
Some Formula Functions that work in Validation Rule Formulas are not available in Formula fields (so you
can’t use this trick to test every Validation Rule Formula.
Admin LifeHack: Using Checkboxesto test Validation Rule FormulaLogic
• ISNEW
• ISCHANGED
• PRIORVALUE
• VLOOKUP
“Sorry Baby,I had to crash that Honda” - Butch Coolidge, Pulp Fiction
80. Bonus: SteveMo's CustomFormulaField Mix Tape
SteveMo's Formulas and Life Hacks
SteveMo's Custom Formula Field Mix Tape
Download link: sforce.co/36wqroz
Password: UoweB33R
* Possible Side Effects include:Dry mouth,Drowsiness,Insomnia,Delusions ofGrandeur ,Walking
on Sunshine, Password Resets,DisdaintowardsUsers.
** If you experience a Conference Call or Meetinglasting4 or more hours,contact a Salesforce
Recruiter and find a better place to work.
81. SteveMo's Formulas and Life Hacks
Bonus: SteveMo's CustomFormulaField Mix Tape
You get all the hits!
Including:
• Days Until Close
• Validation Rule Test
• Days Since Close
• The Ultimate ParentAccount
• MTD Close Date
• YTD Close Date
• Close Date (Quarter)
• The Power of One
• Plus more!!!
82. Formulas for the EverydayAdmin
Bonus: SteveMo's CustomFormulaField Mix Tape
#RapinoePose!
83. Additional Resources
Create Reports and Dashboards for Sales and Marketing Managers
Track key business information for your stakeholders with reports and dashboards.
Reports & Dashboards for Lightning Experience
Visualize key business metrics in real-time using Lightning Experience.
Sales Reports for Lightning Experience
Set up reports and dashboards for your sales managers, reps, and execs.
Lightning Experience Reports & Dashboards Specialist