It's common to require a metric that simply gives a count of the number of rows, or a distinct count of a particular value within a subject. 


For instance. I have a subject that contains test drive bookings for a car dealership, and want a chart that shows the number of bookings per week. We could achieve this by creating a new metric, called number of bookings, that simply reflected the number of rows in any given grouping. There is a detailed explanation on how to create a count metric in your subject here.


In another example, I have a subject that contains sales details from a retail application. Each transaction can be represented by multiple rows, one for each product included in the transaction. We want a chart that shows the number of transactions per week. To achieve this, we can add a new metric, called number of transactions, that shows the distinct count of the column Transaction ID in any given grouping. There is a detailed explanation on how to create a distinct count metric in your subject here


Creating a count metric

Follow these steps to add a count metric to your subject:

  1. Click on the user menu in the top right on the inmydata home screen, and select Settings
  2. Select Subjects in the tabs on the left, and select the subject you wish to edit.
  3. Select the subject you wish to add the count metric to, and select the edit icon
  4. In the Columns tab, press the add metric button
  5. Select the option a count of rows or unique values from the first drop down list
  6. Enter a unique name for your new column
  7. Select the number of rows as the option to count
  8. Press OK in each screen to accept and save your changes,


Creating a distinct count metric

Follow these steps to add a distinct count metric to your subject:

  1. Click on the user menu in the top right on the inmydata home screen, and select Settings
  2. Select Subjects in the tabs on the left, and select the subject you wish to edit.
  3. Select the subject you wish to add the count metric to, and select the edit icon
  4. In the Columns tab, press the add metric button
  5. Select the option a count of rows or unique values from the first drop down list
  6. Enter a unique name for your new column
  7. Select the unique values in one or more columns as the option to count
  8. For each column that should be included in the distinct value calculation, press the add button, select the column and press OK
  9. Press OK in each screen to accept and save your changes,