EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB41943: How to create a metric that calculates the distinct count of an attribute order to display total number of registers in the Data Warehouse in the subtotal area of the grid


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This technical note documents the steps to create a metric that calculates the distinct count of an attribute order to display total number of registers in the Data Warehouse in the subtotal area of the grid.

Introduction:
Need to create a report with a metric that calculates the number of distinct customers. However, the metric must display in the area of subtotal, the total number of customers inserted into the data warehouse, not the sum of the values of this metric.
 
When the report is executed, the data is shown as below:

ka02R000000kW8yQAE_0EM440000002D1m.png

To get this data, perform the steps provided below:
1. Create a metric with Count Function applied to the attribute Customer. Set the parameters for the function Count as Distinct=True and FactID=fact that permits to relate the attribute used in the definition of the metric and the attribute that will be part of the report. It was used the fact Revenue, because according to the data model design, customers generated revenues are those that effectively compare something that can be classified into product category (Category is the attribute to be used in the report).

ka02R000000kW8yQAE_0EM440000002D1v.png

2. Create a new metric with the same definition of the metric above.

ka02R000000kW8yQAE_0EM440000002D1y.png

3. This new metric should have the Level (dimensionality) by Category attribute, as shown below.

ka02R000000kW8yQAE_0EM440000002D1p.png

4. Then it creates a third metric, a compound metric. Note the picture with the definition.

ka02R000000kW8yQAE_0EM440000002D1r.png

5. Another important observation is not to forget to enable "Smart Metric”.

ka02R000000kW8yQAE_0EM440000002D1x.png

6. Finally, just create the report with the attribute (Category) and the third metric. Do not forget to enable Subtotal (F11). Note the next figure.

ka02R000000kW8yQAE_0EM440000002D1t.png

Comment

0 comments

Details

Knowledge Article

Published:

May 2, 2017

Last Updated:

May 2, 2017