Tuesday, July 11, 2017

Salesforce Administrator Beginner - Lightning Experience Reports and Dashboards

Your business has questions. Your Salesforce data has the answers. When you get asked to build a report, the request typically comes in the form of a question. The question might be something like:
  • Which products are my top sellers?
  • Who are my highest value prospects?
  • Which marketing campaigns have been the most successful?
  • How satisfied are my customers?
Before building a report, the trick is to take that question, ask follow-up questions, write requirements, and then map those requirements to report criteria.
Take the story of Maria Jimenez, the admin at Ursa Major Solar. One day her CEO, Sita Nagappan-Alvarez, came to her with questions about how the business was doing; specifically, she wanted to know which products were top sellers.
Maria took Sita’s original question, and followed up with some clarifying questions.
Type of Information
Examples
Sita’s Original Question
Which products are my top sellers?
Maria’s Follow-up Questions
·         What makes a product a top seller, revenue or quantity?
·         Do you want to see the results grouped by product family?
·         What is your date range?
·         If we stop selling a product, should it show on the report?
Requirements
·         “Top sellers” here means quantity rather than revenue.
·         Group products by product family.
·         Show all Closed Won opportunities.
·         Do not show inactive products.
Criteria
·         Report Type = Opportunities with Products
·         Report Format = Summary
·         Grouping = Product Family
·         Show = All Opportunities
·         Date Field = Close Date
·         Range = Current FY
·         Filter = Product ‘equals’ Active
·         Filter = Opportunity Stage ‘equals’ Closed Won
·         Filter Logic = 1 AND 2


A Report is a list of records (like opportunities or accounts) that meet the criteria you define. But reports are much more than simple lists. To get the data you need, you can filter, group, and do math on records. You can even display them graphically in a chart!
Every report is stored in a folder. Report folders determine how reports are accessed, and who can access them. Folders can be public, hidden, or shared, and can be set to read-only or read/write. You control who has access to the contents of the folder based on roles, permissions, public groups, and license types. You can make a folder available to your entire organization, or make it private so that only the owner has access.

To change the sharing settings of report and dashboard folders, switch to Salesforce Classic.

A dashboard is a visual display of key metrics and trends for records in your org. The relationship between a dashboard component and report is 1:1; for each dashboard component, there is a single source report. However, you can use the same report in multiple dashboard components on a single dashboard (for example, use the same report in both a bar chart and pie chart). You can display multiple dashboard components on a single dashboard page, creating a powerful visual display and a way to consume multiple reports that often have a common theme, like sales performance or customer support.
Like reports, dashboards are stored in folders, which control who has access. If you have access to a folder, you can view its dashboards. However, to view the dashboard components, you need access to the underlying reports as well.
Each dashboard has a running user, whose security settings determine which data to display in a dashboard. If the running user is a specific user, all dashboard viewers see data based on the security settings of that user—regardless of their own personal security settings. For this reason, you’ll want to choose the running user wisely, so as not to open up too much visibility. For example, set the sales manager as the running user for a leaderboard for her team. This allows her team members to view the leaderboard for their individual team, but not other teams.
Dynamic dashboards are dashboards for which the running user is always the logged-in user. This way, each user sees the dashboard according to his or her own access level. If you’re concerned about too much access, dynamic dashboards might be the way to go.
A report type is like a template that makes reporting easier. The report type determines which fields and records are available for use when creating a report. This is based on the relationships between a primary object and its related objects. For example, with the ‘Contacts & Accounts’ report type, ‘Contacts’ is the primary object and ‘Accounts’ is the related object.
Reports display only records that meet the criteria defined in the report type. Out of the box, Salesforce provides a set of predefined standard report types. Don’t see all the fields you want? You might need to create a custom report type.
For example, say Lincoln mentions Maria on Chatter to ask which cities have the most leads. Maria can find out by creating a leads report based on the Leads standard report type. But if Lincoln only wants Leads that have Activities, then the Leads standard report type doesn’t quite do the trick, because it returns all Leads (both with and without Activities). This doesn’t worry Maria, though! She knows that she can create a custom report type named Leads with Activities that uses Leads as the primary object and Activities as the related object, which only returns Leads with Activities. Then, all she has to do is create a report based on her new Leads with Activities report type.
To build a new report, you just need to open the report builder. From the Reports tab, click New Report. Then, select a report type. Choosing the right report type is one of the most important steps in building a report. When you pick a report type, you’re picking the records and fields you’ll be able to see in your report. 
Each report type has a primary object relationship and a field layout.
The object relationship determines which records the report type includes. Objects are standard or custom Salesforce entities, like opportunities, accounts, and products. Each object relationship specifies a primary object, like opportunities, and optionally one or more related objects. If you specify only a primary object, your report type includes only records for that object. If you also specify a related object, like products, then your report type includes primary objects with (or without, depending on configuration) related objects. For example, the report type Opportunities with Products includes opportunity records that have at least one related product record. If you add a related object, here’s how you can configure a report type’s object relationship:
  • Primary object with related object—Records returned are only those where the primary object has at least one related object record. In our example of Opportunities with Products, the only records that would be displayed on the report would be opportunities that have at least one related product record.
  • Primary object with or without related object—Records returned are those where the primary object may or may not have a related object record. If we were to create a custom report type, Opportunities with or without Products, then opportunities would be displayed whether or not they have a related product record.
You can have up to four related objects, and each can have the “with” or “with or without” distinction.
The field layout determines which fields the report type includes. Fields often translate to “columns” in a report. A single instance of an object (a record) is described by a set of fields, and each field also has a type. Field types include Text, Number, Checkbox, and Date/Time. For example, each opportunity record has fields (with field type in parentheses) like Account Name (Text), Amount (Number), Closed (Checkbox), and Close Date (Date/Time).
Don’t see the fields you want after selecting a report type? See too many fields? You may need to create or edit a custom report type that adds or hides fields. To create, edit, or review report types, from Setup, enter Report Typesin the Quick Find box, then select Report Types.
You can’t edit standard report types.
You can filter the data in a report using the following filter options.
Filter Type
Description
Standard Filter
Standard filters are applied by default to most objects. Different objects have different standard filters, but most objects include the standard filters Show and Date FieldShow filters the object around common groupings (like “My accounts” or “All accounts”). Date Field filters by a field (such as Created Date or Last Activity) and a date range (such as “All Time” or “Last Month”).
Field Filter
Field filters are available for reports, list views, workflow rules, and other areas of the application. For each filter, set the field, operator, and value. With tabular, summary, and matrix reports, you can drag a field from the Fields pane to the Filters pane to add a report filter.
Filter Logic
Add Boolean conditions to control how field filters are evaluated. You must add at least 1 field filter before applying filter logic.
Cross Filter
Filter a report by the child object using WITH or WITHOUT conditions. Add subfilters to further filter by fields on the child object. For example, if you have a cross filter of Accounts with Opportunities, click Add Opportunity Filter and create the Opportunity Name equals ACME subfilter to only include those opportunities.
Row Limit
For tabular reports, select the maximum number of rows to display, then choose a field to sort by and the sort order. You can use a tabular report as the source report for a dashboard table or chart component, if you limit the number of rows it returns.

Cross-object filters, or “cross filters” allow you to extend your report types to objects related to the original objects defined in the report type. Cross filters help you fine tune your results, without writing code or using formulas. The most common use case is exception reporting. 
Here are some examples that the Sales teams need.
  • Stale Opportunities - Opportunities without activities in the past 30 days. 
  • Orphan Contacts - Contacts without accounts. 
  • Neglected Accounts - Accounts with no opportunities. 
The fields in subfilter are determined by the child object in the cross filter. For example, if your cross filter is Contacts with Opportunities, you can use opportunity fields for your subfilter. 
Filter logic lets you apply filters based on conditions. To add filter logic, from the filters pane of the Report Builder, click Add | Filter Logic. Then, specify how filters should apply to the report. Here are the operators available for applying filter logic.



Operator   Definition

AND   Finds records that match both values.

OR   Finds records that match either value.

NOT   Finds records that exclude values.



There are three report formats available: Tabular, Summary, and Matrix. Tabular is the default format.


Report Format
Primary Use Case
Supported in Dashboards
Reports Charts Supported
Bucket Fields
Formulas
Cross-Object Formulas
Tabular
Make a list
Y*

Y


Summary
Group and Summarize
Y
Y
Y
Y

Matrix
Group and Summarize by row and column
Y
Y
Y
Y


* Row limit required. Learn more here.
** Bucket fields and formulas are not covered in this module.
Let’s walk through building a sample report for each report format.
Tabular reports are the simplest and fastest way to look at your data. Similar to a spreadsheet, they consist simply of an ordered set of fields in columns, with each matching record listed in a row. While easy to set up, they can't be used to create groups of data and there are limits to how you can use them in dashboards. Consequently, they're often best used for tasks like generating a mailing list.
Summary reports are similar to tabular reports, but also allow you to group rows of data, view subtotals, and create charts. Summary reports give us many more options for organizing the data, and are great for use in dashboards. 
Summary reports are the workhorses of reporting—most people find that most of their reports tend to be of this format.
  • Depending on which org you’re using to practice these steps, you may or may not see data in your report at runtime.
  • Click Settings and check Details to show fields in your summary report.
 If you’re looking for an at-a-glance overview of data, especially for something like totals of revenue or quantity of products sold, then the matrix report format is for you.

Matrix reports allow you to group records both by row and by column. These reports are the most time-consuming to set up, but they also provide the most detailed view of our data.
So why would you want to use a matrix report? If you’re looking for an at-a-glance overview of data, especially for something like totals of revenue or quantity of products sold, then the matrix report format is for you.
Salesforce dashboards present multiple reports side-by-side using dashboard components on a single dashboard page layout. Dashboard components come in a variety of chart types, tables, metrics, and gauges, and you can customize how data is grouped, summarized, and displayed for each component. The drag-and-drop dashboard builder is an intuitive interface for building dashboards from source reports you’ve created in Salesforce.

In addition to dashboards, you also have options to add charts to reports and record page layouts. Read on to learn how to visualize data with report charts and dashboard components.
Meet the drag-and-drop dashboard builder, your way to visualize your data for easy consumption at-a-glance. Launch the dashboard builder from the Dashboards tab by clicking New Dashboard. Enter a name for your dashboard and click Create.
Insert a component onto your dashboard by clicking + Component, or add a filter by clicking + Filter [1]. When prompted, select a report and chart type for your new component, or a field and criteria for a filter. Each component shows data from one report. After you’ve added a component, click on it to resize it, delete it, or change its data-supplying source report (Edit pencil[2]. Position your components by dragging and dropping them [3]. A responsive grid layout supports components of different sizes in diverse arrangements [4].
When selecting the component type, consider the following:
Component Type
When to use it



Use a chart when you want to show data graphically. You can choose from a variety of chart types.

Use a gauge when you have a single value that you want to show within a range of custom values

Use a metric when you have one key value to display.

Use a table to show a set of report data in column form.
Finally, when selecting a source report for use in a dashboard component, note that you can’t choose tabular reports, joined reports, or historical trend reports.
With dynamic dashboards, each user sees the data they have access to without needing to create separate dashboards for each user.
This means a single powerful dashboard can be used for multiple users in your company, because the logged-in user viewing the dashboard sees the data they should see, based on their security and sharing settings.
Let's look at an example over at Ursa Major Solar. Say that the sales team consists of one vice president, four sales managers, and 40 sales reps—ten reps per manager. Maria needs to create dashboards that display the following metrics, restricted by role and hierarchy:

Role
Total Bookings
Close Rates by Competitor
Number of Activities by Meeting Type
Sales Rep

Sales Manager
VP of Sales
Sales reps should only see their own data; managers should only see data for the reps they manage; and the VP should see data across the entire team. In this scenario, Maria typically would have to create 45 different dashboards—one for every single person. She’d also have to create multiple folders to manage access rights.
With dynamic dashboards, Maria can create just two dashboards and store them in a single folder. All she needs is a:
  • Dynamic dashboard for sales reps with the following components:
    • A gauge of total bookings
    • A table of activities by meeting type
  • Dynamic dashboard for managers and the VP with the following components:
    • A gauge of total bookings
    • A column chart of close rates by competitor
All users only see data that they can access. Sales reps see their own bookings and activities. Managers see bookings and close rates for the reps they manage. The VP sees bookings and close rates for the whole team. Because the metrics are the same for managers and the VP, you can use the same dynamic dashboard for both roles. The dynamic dashboards feature reduces the number of required dashboards from 45 to two!
Managers with the “View My Team's Dashboards” or “View All Data” permission can set an option to preview the dashboard from the point of view of users under them in the role hierarchy.
Set up a Dynamic Dashboard
  1. From the Dashboards tab, create a new dashboard or edit an existing one.
  2. Open the Properties menu by clicking Edit Dashboard Properties.
  3. Under View Dashboard As, select who people view the dashboard as:
    • Me — Dashboard readers see data in the dashboard according to your access to data.
      For example, if you can only see Opportunities in Canada, then dashboard readers only see data about Opportunities in Canada.
    • A specified user — Dashboard readers see data in the dashboard according to the data access level of whomever you specify.
      For example, if you choose someone who can see Opportunities from any country, then dashboard readers see data about Opportunities from all countries.
    • The logged in user — Dashboard readers see data as themselves, according to their own access to data.
  4. Optionally, select Allow dashboard viewers to change this (dynamic dashboard) to let a reader with appropriate user permissions choose who they view the dashboard as. With the “View My Team’s Dashboards” user permission, the reader can view the dashboard as themself or as anyone beneath them in the role hierarchy. With the “View All Data” user permission, the reader can view the dashboard as anyone.
  5. From the Properties window, click Save. Then, from the Dashboard Builder, click Save again.
When people open your dashboard, they see data as the person that you specified.
If you don’t want to create a dashboard, but just want to add a chart to your report, then report charts may be right for you. Report charts allow you to place a single chart right at the top of your report, so that when you view the report, you can see the chart and the report results in one view.
Here’s how you add a report chart:
  1. From the Reports tab, open the report you made earlier, Leads by Lead Source.
  2. A chart may already appear at the top of your report. You can show or hide the chart by clicking the chart icon (Chart button).
When you’re building a report or dashboard, a common strategy is to clone an existing report and modify it to meet your needs. But where do you get sample reports and dashboards to modify? 
On AppExchange, there are sample report and dashboard packages available from Salesforce Labs. These can be downloaded and installed into your sandbox or production environment. The packages are free and the reports and dashboards can all be cloned and modified to suit your specific needs.
Popular topics include:
  • Salesforce Adoption Dashboards
  • Salesforce CRM Dashboards
  • Sales Activity Dashboards
  • Clean Your Room! Dashboard
  • Service & Support Dashboards
  • Knowledge Base Dashboards and Reports
  • Chatter Dashboards 1.0
  • Chatter Challenge Dashboard Pack
Whether you’re looking for Sales, Service, Activity, CRM, or adoption-related dashboards, there are sample reports and dashboards available for you.
The very first thing you need to remember when modifying an existing report is to clone it. The last thing you want to do is mess up someone else’s report! Give your cloned report a name, select Make Private, and click Create. You can always move it to another report folder later, but this is a safe place to experiment with reports before you’re ready to have others use them.
If you open an AppExchange report or dashboard with features that aren’t supported in Lightning Experience, the unsupported features are suppressed but not removed. The feature won’t appear in Lightning Experience, but if you open the report or dashboard in Salesforce Classic then it’ll be there. For more information, see Lightning Experience Limits.
Now that you know how to install a report and dashboard package and you have assessed what’s in the package, time to start making modifications! Remember to always use Clone before you get started.
Here are some common ways to customize an existing report or dashboard. Try them out!
  • Add a date range
  • Use a relative date value like TODAY, YESTERDAY, LAST WEEK, and LAST MONTH
  • Group by owner
  • Change dashboard component type
  • Change order of columns
  • Add or remove columns
  • Change the report format to tabular, summary, or matrix
  • Add additional dashboard components

2 comments:

Lightning Inter-Component Communication Patterns

Lightning Inter-Component Communication Patterns If you’re comfortable with how a Lightning Component works and want to build producti...