Formulas for the Everyday Admin
Steve Molis Eve Lyons-Berg
With: Moderator:
TO USE YOUR COMPUTER'S AUDIO:
When the webinar begins, you will be connected to audio
using your computer's microphone and speakers (VoIP). A
headset is recommended.
Webinar will begin:
11:00 am, PST
TO USE YOUR TELEPHONE:
If you prefer to use your phone, you must select "Use Telephone"
after joining the webinar and call in using the numbers below.
United States: +1 (213) 929-4212
Access Code: 190-578-492
Audio PIN: Shown after joining the webinar
--OR--
Conga’s suite of solutions creates more efficient organizations by
simplifying and automating data, documents, contracts and reporting.
As the provider of the #1 paid application on the Salesforce AppExchange,
we have more than a decade of experience increasing the value of the
Sales Cloud by removing systems and process pain points that impede the
customer lifecycle. Our 8000+ customers are passionate about our
platform and support giving us 5 stars on the Salesforce AppExchange.
3
Click on the Questions panel to
interact with the presenters
www.salesprocentral.com/webinar-series/improvesalesforceefficiency
About Steve Molis
Self-Taught Admin, Pseudo-Developer, Husband, Dad, LGBT Ally, Rescue Dog Owner, Animal Lover*(but Cats are
somewhere down between Venomous Snakes and Stinging Insects on the list), Community College Drop-Out, Geek,
Formula Ninja, HopHead, Itinerant Wildlife Wrangler, Stand-Up Comic, Bon Vivant. Helping make the world a better
place, one Salesforce user at a time.
About Eve Lyons-Berg
Eve graduated in 2017 from Grinnell College, where she majored in English and took an eclectic assortment
of courses. She now works with Aggregage as editor, content marketer, and webinar host on sites including
Sales Pro Central, eLearning Learning, and Business Innovation Brief.
A little about me…
SteveMo
• Salesforce MVP: 2010 - Present
• Community College Drop-Out: 1985 - Present
• Self-Taught Salesforce Admin/Developer since
2003
• World Record Holder
Safe Harbor Statement
Formulas for the Everyday Admin
• Calculating the % of Month Lapsed and Remaining
• Using the TEXT Function to unlock Picklist Fields
• Creating Validation Rule exemptions
• Creating Dynamic Year-to-Month and Year-to-Date Reports
• Finding the Ultimate Parent Account
• The Greatest Formula Ever Written
Pro-Rate Percent of Month Lapsed/Remaining
Problem
• Calculate percent of the Business Days in current
month passed
Solution
• Evaluate the current Business Day and the total
number of Business Days of the month and divide
Current Day (Number) by Last Day (Number)
Pro-Rate Percent of Month Lapsed/Remaining
((5 * ( FLOOR( ( TODAY() - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( TODAY() - DATE( 1900, 1, 8), 7 ) ) )
-
(5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()),1) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()),1) - DATE( 1900, 1, 8), 7 ) ) ))
/
((5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()),
(IF(
MONTH(TODAY())= 12,
DATE(YEAR(TODAY()), 12, 31) - TODAY(),
DATE(YEAR(TODAY()),
MONTH(TODAY()) + 1, 1) - TODAY() - 1) +
DAY(TODAY())) ) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()),
(IF(
MONTH(TODAY())= 12,
DATE(YEAR(TODAY()), 12, 31) - TODAY(),
DATE(YEAR(TODAY()),
MONTH(TODAY()) + 1, 1) - TODAY() - 1) +
DAY(TODAY())) ) - DATE( 1900, 1, 8), 7 ) ) )
-
(5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()), 1 ) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()), 1 ) - DATE( 1900, 1, 8), 7 ) ) ))
Pro-Rate Percent of Month Lapsed/Remaining
((5 * ( FLOOR( ( TODAY() - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( TODAY() - DATE( 1900, 1, 8), 7 ) ) )
-
(5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()),1) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()),1) - DATE( 1900, 1, 8), 7 ) ) ))
/
((5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()),
(IF(
MONTH(TODAY())= 12,
DATE(YEAR(TODAY()), 12, 31) - TODAY(),
DATE(YEAR(TODAY()),
MONTH(TODAY()) + 1, 1) - TODAY() - 1) +
DAY(TODAY())) ) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()),
(IF(
MONTH(TODAY())= 12,
DATE(YEAR(TODAY()), 12, 31) - TODAY(),
DATE(YEAR(TODAY()),
MONTH(TODAY()) + 1, 1) - TODAY() - 1) +
DAY(TODAY())) ) - DATE( 1900, 1, 8), 7 ) ) )
-
(5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()), 1 ) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()), 1 ) - DATE( 1900, 1, 8), 7 ) )
))
Formulas for the Everyday Admin
Formulas for the Everyday Admin
The Formula Editor, where the magic happens...
Nobody has ever gotten Rabies
by clicking these.
They will not bite you!!!
The Formula Editor, where the magic happens...
The Formula Editor, where the magic happens...
Using the TEXT Function to unlock
Picklist Fields in Formulas
The ISPICKVAL Function:
Determines if the value of a picklist field is equal to a text literal you specify.
Using the TEXT Function to unlock Picklist Fields
IF(ISPICKVAL( Whats_it_like_outside__c, "Zombies"),"RUN!!!" ,
IF(ISPICKVAL( Whats_it_like_outside__c, "Hot"), "Go to the beach",
IF(ISPICKVAL( Whats_it_like_outside__c, "Warm"),"Go hiking",
IF(ISPICKVAL( Whats_it_like_outside__c, “Snowing"), "Build a snowman",
“Watch Netflix"))))
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 the TEXT Function to unlock Picklist Fields
CASE( Whats_it_like_outside__c ,
"Zombies", "RUN!!!",
"Hot", "Go to the beach",
"Warm", "Go hiking",
“Snowing", "Build a snowman" ,
“Watch Netflix")
Using the TEXT Function to unlock Picklist Fields
The TEXT Function
Converts picklist values to text in Formula Fields, Validation Rules
Workflows, Process Builder, and Approval Processes
So you can do stuff like this…
Using the TEXT Function to unlock Picklist Fields
Operators:
• =
• <>
• >
• <
• >=
• <=
Functions:
• ISBLANK
• VALUE
• BEGINS
• CONTAINS
• LEFT/RIGHT
• FIND/SUBSTITUTE
Using the TEXT Function to unlock Picklist Fields
The Problem:
Make a custom Picklist
Field “Loss Reason”
required if the Opportunity
Stage is changed to
“Closed – Lost”
Using the TEXT Function to unlock Picklist Fields
The Solution:
Create a Validation Rule using the TEXT
and ISBLANK Functions
Formula:
AND(
TEXT( StageName ) = "Closed - Lost",
ISBLANK(TEXT( Loss_Reason__c ))
)
Using the TEXT Function to unlock Picklist Fields
The Problem:
Need to calculate the
Opportunity $Amount
discounted using the
Discount% (a picklist field)
but…
Picklist Values are not Numbers
(even if they are) whut the?!?
The Solution:
Create a custom Formula(Currency) field using
the TEXT and VALUE functions
Formula:
Amount *
( VALUE( TEXT( Discount_Pct__c ) ) / 100 )
Using the TEXT Function to unlock Picklist Fields
Pro Tip:
Always create a List
View or Report that
displays your
Formula Input and
Output side-by-side
(and check your
Math!)
Using the TEXT Function to unlock Picklist Fields
Exempting Users, Roles, and Profiles
from Validation Rules
Exempting Users, Roles, and Profiles in Formulas
AND(
Do_you_owe_SteveMo_a_beer__c = TRUE,
ISBLANK(How_much_beer_do_you_owe_SteveMo__c)
)
Exempting Users, Roles, and Profiles in Formulas
AND(
Do_you_owe_SteveMo_a_beer__c = TRUE,
ISBLANK(How_much_beer_do_you_owe_SteveMo__c)
)
Just click it, don’t be
afraid…
Exempting Users, Roles, and Profiles in Formulas
Exempting Users, Roles, and Profiles in Formulas
AND(
Do_you_owe_SteveMo_a_beer__c = TRUE,
ISBLANK(How_much_beer_do_you_owe_SteveMo__c),
$User.Username <> "SteveMo@MyForce.org" ,
$User.Username <> "Moe.Howard@3Stooges.org",
$User.Username <> "Larry.Fine@3Stooges.org",
$User.Username <> "Curly.Howard@3Stooges.org
)
Exempting Users, Roles, and Profiles in Formulas
AND(
Do_you_owe_SteveMo_a_beer__c = TRUE,
ISBLANK(How_much_beer_do_you_owe_SteveMo__c
),
CASE( $User.Username ,
"SteveMo@MyForce.org" , 1 ,
"Moe.Howard@3Stooges.org", 1 ,
"Larry.Fine@3Stooges.org", 1 ,
"Curly.Howard@3Stooges.org", 1 ,
0 ) = 0 )
Exempting Users, Roles, and Profiles in Formulas
AND(
Do_you_owe_SteveMo_a_beer__c = TRUE,
ISBLANK( How_much_beer_do_you_owe_SteveMo__c ),
CASE($User.Username,
"SteveMo@MyForce.org", 1,
"Moe.Howard@3Stooges.org", 1,
"Larry.Fine@3Stooges.org", 1,
"Curly.Howard@3Stooges.org", 1,
0) = 0 ,
CASE( $UserRole.Name ,
"Accounting", 1 ,
"Finance", 1 ,
“Auditing", 1 ,
0 ) = 0 )
Exempting Users, Roles, and Profiles in Formulas
AND(
Do_you_owe_SteveMo_a_beer__c = TRUE,
ISBLANK( How_much_beer_do_you_owe_SteveMo__c ),
CASE($User.Username,
"SteveMo@MyForce.org", 1,
"Moe.Howard@3Stooges.org", 1,
"Larry.Fine@3Stooges.org", 1,
"Curly.Howard@3Stooges.org", 1,
0) = 0 ,
"Accounting", 1 ,
"Finance", 1 ,
“Auditing", 1 ,
0 ) = 0 ,
CASE( $Profile.Name ,
"Executive", 1 ,
"Marketing User", 1 ,
"Customer Support", 1 ,
0 ) = 0 )
Exempting Users, Roles, and Profiles in Formulas
You don't want to use an OR
statement with NOT or <> because a
field like $User.Username,
$Profile.Name, $Role.Name, etc. can
only hold 1 value at a time.
Any User can only have 1 Name, 1
Profile, 1 Role, etc…
Unless the User is Schrodinger's Cat
(in which case all bets are off)
Exempting Users, Roles, and Profiles in Formulas
Creating Dynamic Year-to-Month and
Year-to-Date Reports
Dynamic Year-to-Month and Year-to-Date Reports
Custom Field
Datatype = Formula
Result = Checkbox
Formula: Year-to-Month
MONTH(CloseDate) <= MONTH(TODAY())
Formula: Year-to-Date
(CloseDate - DATE(YEAR( CloseDate ), 01, 01) )
<=
(TODAY() - DATE(YEAR( TODAY() ), 01, 01) )
Dynamic Year-to-Month and Year-to-Date Reports
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.
However…
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
The Ultimate Parent Account
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 (even if there is
no Account Hierarchy).
The Solution
The Ultimate Parent Account
The "Ultimate” Parent Account
The "Ultimate” Parent Account
The "Ultimate” Parent Account
BLANKVALUE( Parent.Parent.Parent.Parent.Parent.Name,
BLANKVALUE( Parent.Parent.Parent.Parent.Name,
BLANKVALUE( Parent.Parent.Parent.Name,
BLANKVALUE( Parent.Parent.Name,
BLANKVALUE( Parent.Name,
Name ) ) ) ) )
Formula:
The "Ultimate” Parent Account
The "Ultimate” Parent Account
The Power of One – The
Greatest Formula Ever
“Like ever, ever, EVER…” – Taylor Swift
The Power of One
Created by Thomas Tobin - The Patron Saint of Salesforce
Analytics
Taught to me at Dreamforce’09
The Greatest Formula Ever
The Power of One
Step 1:
Create a custom field on the object you want to count
Select:
Datatype = Formula
The Greatest Formula Ever
The Power of One
Step 2:
Select:
Result = Number, 0 decimals
Pro Tip:
DON’T name it “Power of 1”
The Formula
To be continued…
The Greatest Formula Ever
The Power of One
Step 3:
The formula
The Greatest Formula Ever
The Power of One
Step 3:
The formula
The Greatest Formula Ever
That’s it…
Why are you looking at me
like that?
The Power of One
The Greatest Formula Ever
The GREATEST Formula Ever
Power of One
That’s great…
But 866 of
WHAT?!?
The GREATEST Formula Ever
Power of One
Power of One
The Greatest Formula Ever
Power of One
The Greatest Formula Ever
How d’yah like
me now???
The Power of One
The Greatest Formula Ever
Power of One
The Greatest Formula Ever
That was friggin’ awesome!!!
Where can I learn more?!?
Related Trailheads
Formulas and Validations
Advanced Formulas
Build a Battle Station App
Build a Suggestion Box App
Create Reports and Dashboards for Sales and
Marketing Managers
Learn about Formulas and MORE!
Trailhead
SteveMo’s Formula & Report Mix
Trailhead
SteveMo’s Formula & Report Mix
65
Q&A
Salesforce MVP
Linkedin page: stevemolis/
Twitter ID: @SteveMoForce
Trailblazer Communuity: https://sforce.co/2O0iMVo
Yelp Reviews: yelp.com/biz/stevemo-wakefield
Steve Molis
With:
Content Manager, Aggregage
Linkedin page: evelyonsberg/
Twitter ID: @SalesProCentral
Email: eve@aggregage.com
Website: http://www.aggregage.com
Eve Lyons-Berg
Moderator:
www.salesprocentral.com/webinar-series/improvesalesforceefficiency

More Related Content

PDF
Steve mo's formulas and life hacks wellington nz 2020-05-05
PDF
Steve mo's formulas and life hacks frankfurt de 2020-05-07
PDF
Les formules et moi, ça fait 3!
PDF
Become a Formula Ninja
PDF
Validation Rules
PPTX
Introduction to Salesforce validation rules new
PDF
101 Excel Formulas .pdf
PDF
100 sample formulas_v6
Steve mo's formulas and life hacks wellington nz 2020-05-05
Steve mo's formulas and life hacks frankfurt de 2020-05-07
Les formules et moi, ça fait 3!
Become a Formula Ninja
Validation Rules
Introduction to Salesforce validation rules new
101 Excel Formulas .pdf
100 sample formulas_v6

Similar to Improve Your Salesforce Efficiency: Formulas for the Everyday Admin (20)

PDF
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
PDF
Salesforce Admin Hacks
PDF
Formula Ninja at Dreamforce 2014
PDF
6 Reporting Formulas That Will Delight Your Users
PDF
Sales force class-3
PDF
Getting Started with Calc Manager for Hyperion Financial Management
PPTX
06 necto advanced_analytics_ready
PPT
A G S006 Little 091807
PDF
Top 10 excel analytic tests to minimize fraud and process risks
PDF
BP208 Fabulous Feats with @Formula
PDF
Fast formula in Fusion Cloud HCM
PDF
Salesforce interview preparation toolkit formula and validation rules in sale...
PPTX
IF Statement Tutorial
PDF
Sage HRMS Crystal Reports- Beyond the Basics
PPTX
advance spreadsheet skils LESSON 4 - PPT.pptx
PPTX
6 Cool Tips For Salesforce Admins
PDF
Excel Formulas . for easy understand.pdf
PPT
Formula Support in OrgPublisher 9.1 Premier
PDF
EXCEL FUNCTIONS and Advanced Formula Combinations Excel Mastery Series Unleas...
PDF
Revving up the Force.com Formula Engine
Salesforce interview-preparation-toolkit-formula-and-validation-rules-in-sale...
Salesforce Admin Hacks
Formula Ninja at Dreamforce 2014
6 Reporting Formulas That Will Delight Your Users
Sales force class-3
Getting Started with Calc Manager for Hyperion Financial Management
06 necto advanced_analytics_ready
A G S006 Little 091807
Top 10 excel analytic tests to minimize fraud and process risks
BP208 Fabulous Feats with @Formula
Fast formula in Fusion Cloud HCM
Salesforce interview preparation toolkit formula and validation rules in sale...
IF Statement Tutorial
Sage HRMS Crystal Reports- Beyond the Basics
advance spreadsheet skils LESSON 4 - PPT.pptx
6 Cool Tips For Salesforce Admins
Excel Formulas . for easy understand.pdf
Formula Support in OrgPublisher 9.1 Premier
EXCEL FUNCTIONS and Advanced Formula Combinations Excel Mastery Series Unleas...
Revving up the Force.com Formula Engine
Ad

More from Aggregage (20)

PDF
Staying Ahead of UFLPA Enforcement: Best Practices for Retail Supply Chains
PDF
Making the Moment: The Art of Creating Events That Drive Results
PDF
Maximizing Profit And Productivity: The New Era Of AI-Powered Accounting
PPTX
From Rigid To Resilient: Why Enterprises Need Modular Commerce Now
PDF
How to Achieve High-Accuracy Results When Using LLMs
PDF
AI for Paralegals: Everything You Need to Know (and How to Use It Safely)
PPTX
Beyond the Blast: How to Pitch with Purpose and Build Lasting Media Relations...
PDF
Next-Level Fraud Prevention: Strategies for Today’s Threat Landscape
PDF
Cash Flow Secrets Every Upskilled CPA Should Know
PDF
The Great Disruption: Leveraging AI To Better Your Benefits Strategy
PDF
AI in Marketing & Sales: Today’s Tools, Tomorrow’s Potential
PDF
Navigating Payroll Compliance: Future-Proofing Payroll in an Evolving Regulat...
PDF
AP Automation: The Competitive Advantage Your Business Needs
PPTX
Campaigns that Click: Practical Personalization Strategies to Boost ROI
PDF
The Constructor's Digital Transformation Playbook: Reducing Risk With Technology
PDF
The Future Of Finance: How To Manage Spend The Right Way
PDF
The Evolving Retailers Fulfillment Strategy: Meeting Demands with Agility
PDF
The New Way CPAs are Delivering Value: Aligning Automation with Client Success
PDF
The 2nd Generation of Innovation Management: A Survival Guide
PPTX
Case Closed: How to Optimize Your Legal Intake Process for Efficiency
Staying Ahead of UFLPA Enforcement: Best Practices for Retail Supply Chains
Making the Moment: The Art of Creating Events That Drive Results
Maximizing Profit And Productivity: The New Era Of AI-Powered Accounting
From Rigid To Resilient: Why Enterprises Need Modular Commerce Now
How to Achieve High-Accuracy Results When Using LLMs
AI for Paralegals: Everything You Need to Know (and How to Use It Safely)
Beyond the Blast: How to Pitch with Purpose and Build Lasting Media Relations...
Next-Level Fraud Prevention: Strategies for Today’s Threat Landscape
Cash Flow Secrets Every Upskilled CPA Should Know
The Great Disruption: Leveraging AI To Better Your Benefits Strategy
AI in Marketing & Sales: Today’s Tools, Tomorrow’s Potential
Navigating Payroll Compliance: Future-Proofing Payroll in an Evolving Regulat...
AP Automation: The Competitive Advantage Your Business Needs
Campaigns that Click: Practical Personalization Strategies to Boost ROI
The Constructor's Digital Transformation Playbook: Reducing Risk With Technology
The Future Of Finance: How To Manage Spend The Right Way
The Evolving Retailers Fulfillment Strategy: Meeting Demands with Agility
The New Way CPAs are Delivering Value: Aligning Automation with Client Success
The 2nd Generation of Innovation Management: A Survival Guide
Case Closed: How to Optimize Your Legal Intake Process for Efficiency
Ad

Recently uploaded (15)

PDF
ungquachung-final-report-uehthuc-tap-di.pdf
PDF
LED Commercial & Emergency Solution Supplier
PDF
kartik maas braj 84 kos yatra 2025 itinerary
DOC
NSCC毕业证学历认证,阿肯色大学小石城分校毕业证学位证书
PPTX
1Module-Retail Introduction for Retail sales training
PDF
SAP Brochure (3).pdfdddddddddddddddddddd
PPTX
Sales Techniques & Strategies (Selling for trust and sustainability).pptx
PPTX
Sales KPIs (Know how you far from your target).pptx
PDF
The Role of Human Hair Wigs in the Entertainment Industry.pdf
PPTX
operations management second semester annar
PPTX
Exact Print’s Custom T Shirts Unleash Dynamic Energy
DOC
UNCP毕业证学历认证,埃奇伍德大学毕业证存档可查的
PPTX
"Don Morphy – Luxury Men’s Custom Suits | Perfect Fit, Timeless Style"
PPTX
3- units of time.pptxoncancknznxolj kznlXoja
PPTX
incident reporting and investigation part1
ungquachung-final-report-uehthuc-tap-di.pdf
LED Commercial & Emergency Solution Supplier
kartik maas braj 84 kos yatra 2025 itinerary
NSCC毕业证学历认证,阿肯色大学小石城分校毕业证学位证书
1Module-Retail Introduction for Retail sales training
SAP Brochure (3).pdfdddddddddddddddddddd
Sales Techniques & Strategies (Selling for trust and sustainability).pptx
Sales KPIs (Know how you far from your target).pptx
The Role of Human Hair Wigs in the Entertainment Industry.pdf
operations management second semester annar
Exact Print’s Custom T Shirts Unleash Dynamic Energy
UNCP毕业证学历认证,埃奇伍德大学毕业证存档可查的
"Don Morphy – Luxury Men’s Custom Suits | Perfect Fit, Timeless Style"
3- units of time.pptxoncancknznxolj kznlXoja
incident reporting and investigation part1

Improve Your Salesforce Efficiency: Formulas for the Everyday Admin

  • 1. Formulas for the Everyday Admin Steve Molis Eve Lyons-Berg With: Moderator: TO USE YOUR COMPUTER'S AUDIO: When the webinar begins, you will be connected to audio using your computer's microphone and speakers (VoIP). A headset is recommended. Webinar will begin: 11:00 am, PST TO USE YOUR TELEPHONE: If you prefer to use your phone, you must select "Use Telephone" after joining the webinar and call in using the numbers below. United States: +1 (213) 929-4212 Access Code: 190-578-492 Audio PIN: Shown after joining the webinar --OR--
  • 2. Conga’s suite of solutions creates more efficient organizations by simplifying and automating data, documents, contracts and reporting. As the provider of the #1 paid application on the Salesforce AppExchange, we have more than a decade of experience increasing the value of the Sales Cloud by removing systems and process pain points that impede the customer lifecycle. Our 8000+ customers are passionate about our platform and support giving us 5 stars on the Salesforce AppExchange.
  • 3. 3 Click on the Questions panel to interact with the presenters www.salesprocentral.com/webinar-series/improvesalesforceefficiency
  • 4. About Steve Molis Self-Taught Admin, Pseudo-Developer, Husband, Dad, LGBT Ally, Rescue Dog Owner, Animal Lover*(but Cats are somewhere down between Venomous Snakes and Stinging Insects on the list), Community College Drop-Out, Geek, Formula Ninja, HopHead, Itinerant Wildlife Wrangler, Stand-Up Comic, Bon Vivant. Helping make the world a better place, one Salesforce user at a time. About Eve Lyons-Berg Eve graduated in 2017 from Grinnell College, where she majored in English and took an eclectic assortment of courses. She now works with Aggregage as editor, content marketer, and webinar host on sites including Sales Pro Central, eLearning Learning, and Business Innovation Brief.
  • 5. A little about me… SteveMo • Salesforce MVP: 2010 - Present • Community College Drop-Out: 1985 - Present • Self-Taught Salesforce Admin/Developer since 2003 • World Record Holder
  • 7. Formulas for the Everyday Admin • Calculating the % of Month Lapsed and Remaining • Using the TEXT Function to unlock Picklist Fields • Creating Validation Rule exemptions • Creating Dynamic Year-to-Month and Year-to-Date Reports • Finding the Ultimate Parent Account • The Greatest Formula Ever Written
  • 8. Pro-Rate Percent of Month Lapsed/Remaining Problem • Calculate percent of the Business Days in current month passed Solution • Evaluate the current Business Day and the total number of Business Days of the month and divide Current Day (Number) by Last Day (Number)
  • 9. Pro-Rate Percent of Month Lapsed/Remaining ((5 * ( FLOOR( ( TODAY() - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( TODAY() - DATE( 1900, 1, 8), 7 ) ) ) - (5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()),1) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()),1) - DATE( 1900, 1, 8), 7 ) ) )) / ((5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()), (IF( MONTH(TODAY())= 12, DATE(YEAR(TODAY()), 12, 31) - TODAY(), DATE(YEAR(TODAY()), MONTH(TODAY()) + 1, 1) - TODAY() - 1) + DAY(TODAY())) ) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()), (IF( MONTH(TODAY())= 12, DATE(YEAR(TODAY()), 12, 31) - TODAY(), DATE(YEAR(TODAY()), MONTH(TODAY()) + 1, 1) - TODAY() - 1) + DAY(TODAY())) ) - DATE( 1900, 1, 8), 7 ) ) ) - (5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()), 1 ) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()), 1 ) - DATE( 1900, 1, 8), 7 ) ) ))
  • 10. Pro-Rate Percent of Month Lapsed/Remaining ((5 * ( FLOOR( ( TODAY() - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( TODAY() - DATE( 1900, 1, 8), 7 ) ) ) - (5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()),1) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()),1) - DATE( 1900, 1, 8), 7 ) ) )) / ((5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()), (IF( MONTH(TODAY())= 12, DATE(YEAR(TODAY()), 12, 31) - TODAY(), DATE(YEAR(TODAY()), MONTH(TODAY()) + 1, 1) - TODAY() - 1) + DAY(TODAY())) ) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()), (IF( MONTH(TODAY())= 12, DATE(YEAR(TODAY()), 12, 31) - TODAY(), DATE(YEAR(TODAY()), MONTH(TODAY()) + 1, 1) - TODAY() - 1) + DAY(TODAY())) ) - DATE( 1900, 1, 8), 7 ) ) ) - (5 * ( FLOOR( ( DATE(YEAR(TODAY()),MONTH(TODAY()), 1 ) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATE(YEAR(TODAY()),MONTH(TODAY()), 1 ) - DATE( 1900, 1, 8), 7 ) ) ))
  • 11. Formulas for the Everyday Admin
  • 12. Formulas for the Everyday Admin
  • 13. The Formula Editor, where the magic happens... Nobody has ever gotten Rabies by clicking these. They will not bite you!!!
  • 14. The Formula Editor, where the magic happens...
  • 15. The Formula Editor, where the magic happens...
  • 16. Using the TEXT Function to unlock Picklist Fields in Formulas
  • 17. The ISPICKVAL Function: Determines if the value of a picklist field is equal to a text literal you specify. Using the TEXT Function to unlock Picklist Fields IF(ISPICKVAL( Whats_it_like_outside__c, "Zombies"),"RUN!!!" , IF(ISPICKVAL( Whats_it_like_outside__c, "Hot"), "Go to the beach", IF(ISPICKVAL( Whats_it_like_outside__c, "Warm"),"Go hiking", IF(ISPICKVAL( Whats_it_like_outside__c, “Snowing"), "Build a snowman", “Watch Netflix"))))
  • 18. 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 the TEXT Function to unlock Picklist Fields CASE( Whats_it_like_outside__c , "Zombies", "RUN!!!", "Hot", "Go to the beach", "Warm", "Go hiking", “Snowing", "Build a snowman" , “Watch Netflix")
  • 19. Using the TEXT Function to unlock Picklist Fields The TEXT Function Converts picklist values to text in Formula Fields, Validation Rules Workflows, Process Builder, and Approval Processes So you can do stuff like this…
  • 20. Using the TEXT Function to unlock Picklist Fields Operators: • = • <> • > • < • >= • <= Functions: • ISBLANK • VALUE • BEGINS • CONTAINS • LEFT/RIGHT • FIND/SUBSTITUTE
  • 21. Using the TEXT Function to unlock Picklist Fields The Problem: Make a custom Picklist Field “Loss Reason” required if the Opportunity Stage is changed to “Closed – Lost”
  • 22. Using the TEXT Function to unlock Picklist Fields The Solution: Create a Validation Rule using the TEXT and ISBLANK Functions Formula: AND( TEXT( StageName ) = "Closed - Lost", ISBLANK(TEXT( Loss_Reason__c )) )
  • 23. Using the TEXT Function to unlock Picklist Fields The Problem: Need to calculate the Opportunity $Amount discounted using the Discount% (a picklist field) but… Picklist Values are not Numbers (even if they are) whut the?!?
  • 24. The Solution: Create a custom Formula(Currency) field using the TEXT and VALUE functions Formula: Amount * ( VALUE( TEXT( Discount_Pct__c ) ) / 100 ) Using the TEXT Function to unlock Picklist Fields
  • 25. Pro Tip: Always create a List View or Report that displays your Formula Input and Output side-by-side (and check your Math!) Using the TEXT Function to unlock Picklist Fields
  • 26. Exempting Users, Roles, and Profiles from Validation Rules
  • 27. Exempting Users, Roles, and Profiles in Formulas AND( Do_you_owe_SteveMo_a_beer__c = TRUE, ISBLANK(How_much_beer_do_you_owe_SteveMo__c) )
  • 28. Exempting Users, Roles, and Profiles in Formulas AND( Do_you_owe_SteveMo_a_beer__c = TRUE, ISBLANK(How_much_beer_do_you_owe_SteveMo__c) ) Just click it, don’t be afraid…
  • 29. Exempting Users, Roles, and Profiles in Formulas
  • 30. Exempting Users, Roles, and Profiles in Formulas AND( Do_you_owe_SteveMo_a_beer__c = TRUE, ISBLANK(How_much_beer_do_you_owe_SteveMo__c), $User.Username <> "SteveMo@MyForce.org" , $User.Username <> "Moe.Howard@3Stooges.org", $User.Username <> "Larry.Fine@3Stooges.org", $User.Username <> "Curly.Howard@3Stooges.org )
  • 31. Exempting Users, Roles, and Profiles in Formulas AND( Do_you_owe_SteveMo_a_beer__c = TRUE, ISBLANK(How_much_beer_do_you_owe_SteveMo__c ), CASE( $User.Username , "SteveMo@MyForce.org" , 1 , "Moe.Howard@3Stooges.org", 1 , "Larry.Fine@3Stooges.org", 1 , "Curly.Howard@3Stooges.org", 1 , 0 ) = 0 )
  • 32. Exempting Users, Roles, and Profiles in Formulas AND( Do_you_owe_SteveMo_a_beer__c = TRUE, ISBLANK( How_much_beer_do_you_owe_SteveMo__c ), CASE($User.Username, "SteveMo@MyForce.org", 1, "Moe.Howard@3Stooges.org", 1, "Larry.Fine@3Stooges.org", 1, "Curly.Howard@3Stooges.org", 1, 0) = 0 , CASE( $UserRole.Name , "Accounting", 1 , "Finance", 1 , “Auditing", 1 , 0 ) = 0 )
  • 33. Exempting Users, Roles, and Profiles in Formulas AND( Do_you_owe_SteveMo_a_beer__c = TRUE, ISBLANK( How_much_beer_do_you_owe_SteveMo__c ), CASE($User.Username, "SteveMo@MyForce.org", 1, "Moe.Howard@3Stooges.org", 1, "Larry.Fine@3Stooges.org", 1, "Curly.Howard@3Stooges.org", 1, 0) = 0 , "Accounting", 1 , "Finance", 1 , “Auditing", 1 , 0 ) = 0 , CASE( $Profile.Name , "Executive", 1 , "Marketing User", 1 , "Customer Support", 1 , 0 ) = 0 )
  • 34. Exempting Users, Roles, and Profiles in Formulas You don't want to use an OR statement with NOT or <> because a field like $User.Username, $Profile.Name, $Role.Name, etc. can only hold 1 value at a time. Any User can only have 1 Name, 1 Profile, 1 Role, etc… Unless the User is Schrodinger's Cat (in which case all bets are off)
  • 35. Exempting Users, Roles, and Profiles in Formulas
  • 36. Creating Dynamic Year-to-Month and Year-to-Date Reports
  • 37. Dynamic Year-to-Month and Year-to-Date Reports Custom Field Datatype = Formula Result = Checkbox Formula: Year-to-Month MONTH(CloseDate) <= MONTH(TODAY()) Formula: Year-to-Date (CloseDate - DATE(YEAR( CloseDate ), 01, 01) ) <= (TODAY() - DATE(YEAR( TODAY() ), 01, 01) )
  • 38. Dynamic Year-to-Month and Year-to-Date Reports
  • 40. 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. However… 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 The Ultimate Parent Account
  • 42. 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 (even if there is no Account Hierarchy). The Solution The Ultimate Parent Account
  • 45. The "Ultimate” Parent Account BLANKVALUE( Parent.Parent.Parent.Parent.Parent.Name, BLANKVALUE( Parent.Parent.Parent.Parent.Name, BLANKVALUE( Parent.Parent.Parent.Name, BLANKVALUE( Parent.Parent.Name, BLANKVALUE( Parent.Name, Name ) ) ) ) ) Formula:
  • 48. The Power of One – The Greatest Formula Ever “Like ever, ever, EVER…” – Taylor Swift
  • 49. The Power of One Created by Thomas Tobin - The Patron Saint of Salesforce Analytics Taught to me at Dreamforce’09 The Greatest Formula Ever
  • 50. The Power of One Step 1: Create a custom field on the object you want to count Select: Datatype = Formula The Greatest Formula Ever
  • 51. The Power of One Step 2: Select: Result = Number, 0 decimals Pro Tip: DON’T name it “Power of 1” The Formula To be continued… The Greatest Formula Ever
  • 52. The Power of One Step 3: The formula The Greatest Formula Ever
  • 53. The Power of One Step 3: The formula The Greatest Formula Ever That’s it… Why are you looking at me like that?
  • 54. The Power of One The Greatest Formula Ever
  • 55. The GREATEST Formula Ever Power of One
  • 56. That’s great… But 866 of WHAT?!? The GREATEST Formula Ever Power of One
  • 57. Power of One The Greatest Formula Ever
  • 58. Power of One The Greatest Formula Ever How d’yah like me now???
  • 59. The Power of One The Greatest Formula Ever
  • 60. Power of One The Greatest Formula Ever
  • 61. That was friggin’ awesome!!! Where can I learn more?!?
  • 62. Related Trailheads Formulas and Validations Advanced Formulas Build a Battle Station App Build a Suggestion Box App Create Reports and Dashboards for Sales and Marketing Managers Learn about Formulas and MORE!
  • 65. 65 Q&A Salesforce MVP Linkedin page: stevemolis/ Twitter ID: @SteveMoForce Trailblazer Communuity: https://sforce.co/2O0iMVo Yelp Reviews: yelp.com/biz/stevemo-wakefield Steve Molis With: Content Manager, Aggregage Linkedin page: evelyonsberg/ Twitter ID: @SalesProCentral Email: eve@aggregage.com Website: http://www.aggregage.com Eve Lyons-Berg Moderator: www.salesprocentral.com/webinar-series/improvesalesforceefficiency