Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8545

Re: Formula to Count Unique Records

$
0
0

Hi Robert,

 

Are you looking to display distinct count of events for each customer based on mkt? (as in second table in your screenshot?).

 

Then, as you are trying to do, crosstab would be better option.


What is the field that gives you the count of events?

 

Assuming you have created data source connection and brought data into your report, below steps explains getting distinct count for each customer and each mkt. But still it's not clear which is the field that needs to be used for displaying values like 13547, 101, 11, 160 etc, so I have included distinct count on customer ID, I think that is not your requirement.

 

Create a formula (say cust_name) with Customer First Name and Last Name for display as below:

<Database field for First Name> & ' '& <database field for Last Name>

 

 

  1. From insert menu option, select Cross-tab.
  2. Right click on cross tab in the top left corner where blank space is displayed and select Cross-tab expert.
  3. Now, from "Available Fields" options, insert the formula(cust_name) created above into "Rows" to display customer name on the left hand side of cross tab.
  4. Insert mkt field into "Columns".
  5. Insert customer Id field into "Summarized fields" and select inserted field and change summary to distinct count using "Change Summary" button.

 

Now this enables us to display the Customer Name and mkt wise distinct count of Customer ID (you have to change this with the field which you want to use for distinct count).


Now, the crosstab will come up with sub totals for each  Customer and for each mkt. If you doesn't want to display those, you have to navigate to Customize Style under Crosstab expert and check/select the checkboxes for suppress subtotal for all the fields under rows and columns (wherever that checkbox is enabled).


If you want more information on building a crosstab, you can search in SCN forum.


Hope this helps you in starting with a crosstab.


Thanks,

Raghavendra


Viewing all articles
Browse latest Browse all 8545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>