
To create a graphic representation of metrics, add a histogram.

## Allowed metrics

The table below summarizes metric configurations and their compatibility with histograms.

| Metric conditions*                                         | Allowed in histograms?                        |                                      
|-----------------------------------------------------|----------------------------------------------|
| Contain any [profile attributes](/docs/assets/customer-properties)                                 | No                                           |
| Contain an [event](/docs/assets/events/introduction-to-events)                                  | Yes, except for the metrics with the **First** and **Last** aggregators              |
| Contain multiple events or one event with multiple parameters | Yes, except for the metrics with the **First** and **Last** aggregators |
| Contain multiple events with multiple parameters | No |                                              |
| No event or profile attribute in conditions (for example, a static value metric) | Yes |

`*` *Metric conditions* refers to the configuration of a metric on the interface for the following metric types:
  
<div class="content-tabs" data-tab-group="tabgrp-1247">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1247-0" data-tab-group="tabgrp-1247" data-tab-active="true">Simple</button><button class="tab-button" data-tab-id="tabgrp-1247-1" data-tab-group="tabgrp-1247">Formula</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1247-0" data-tab-group="tabgrp-1247" data-tab-active="true">

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/analytics/_gfx/metric-conditions.png" class="large" alt="The highlighted section on the screen presents metric conditions"><figcaption>Metric conditions of a simple metric</figcaption></figure>

</div>

<div class="tab-panel" data-tab-id="tabgrp-1247-1" data-tab-group="tabgrp-1247">

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/analytics/_gfx/formula-metric-conditions.png" class="large" alt="The highlighted section on the screen presents metric conditions"><figcaption>Metric conditions of a formula metric</figcaption></figure>

</div>
</div>

  

## Requirements
---
- You must have a [user role](/docs/settings/identity-access-management/permissions) with the following permissions:
  - [access Decision Hub](/docs/settings/identity-access-management/permissions/analytics-permissions#access-the-decision-hub)
  - [view analyses](/docs/settings/identity-access-management/permissions/analytics-permissions#view-analyses)
  - [create analyses](/docs/settings/identity-access-management/permissions/analytics-permissions#create-analyses)
  - [edit analyses](/docs/settings/identity-access-management/permissions/analytics-permissions#edit-analyses)
  - [preview results](/docs/settings/identity-access-management/permissions/analytics-permissions#preview-results)
- Create a metric.  
  Refer to the table in the ["Allowed metrics" section](#allowed-metrics) to become familiar with the limits and constraints.  
  
  <div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

  You can read more about metrics in:
  - [Creating simple metrics](/docs/analytics/metrics/creating-simple-metrics)
  - [Creating formula metrics](/docs/analytics/metrics/creating-formula-metrics)

  </div></div></div>


## Creating a histogram
---

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/analytics/_gfx/creating-histograms.png" alt="Image presents the histogram wizard" class="full" >
<figcaption>A blank histogram</figcaption>
</figure>

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Image presents the Decision Hub icon" class="icon"> **Decision Hub > Histograms > New histogram**.
2. Enter the name of the histogram.
3. Optionally, to let other users know about the purpose of the histogram, write a short description.
4. From the list of metrics, select a metric you want to include in the histogram.  
    Refer to the table in the ["Allowed metrics" section](#allowed-metrics) to become familiar with the limits and constraints. 
5. To choose the time units by which the metric data is aggregated in the histogram, click the **Interval** button. 
    
   <div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   When you select the monthly interval option, the display of the histogram presents the results of metrics from 30 days. That is the reason of a slight discrepancy may occur between the results of the histogram and the metric used in the histogram.

   </div></div></div>

6. To select the time range analyzed in the histogram, click the calendar icon. The chosen date range will apply to all metrics added to the histogram. 

    
   <div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   Pay attention to the time intervals set in metrics and in the histogram. If the histogram analyzes a period that is longer than the one set in the metric, you will not see the data for the periods that don't overlap the metric period.

   </div></div></div>


7. To add another metric to the histogram, click the plus button (you can add up to 7 metrics).
8. To complete the process, click the **Save** button.  
**Result**: You can find the histogram on the list of histograms. 


