1 Reply Latest reply on Mar 28, 2018 4:05 PM by Patrick Van Der Hyde

# Running Count Distinct with Fixed Dimensions, Tableau Version 10.5

Hello!

Forgive my English, but I used Google to translate! I have the following situation:

I need to measure the Conversion Rate of Single Customers who have purchased in a certain period, stratifying by Seller and by Product.

This fee is calculated by dividing the Number of Single Customers who made a purchase in the Month by the Total Amount of Active Customers in the Month.

The number of Active Customers in a given month is made through a Distinct Count in a range of six months prior to the reference month (Current Month - Six Months). That is, it is a Distinguished Mobile Count. While I have the whole time horizon the calculation is apparently correct.

Correct Values:

The problem begins when I stratify the data, filtering by Product or Time, because the Amount of Active Customers is recalculated, distorting the result. I was unable to set the Active Clients count, at most it should be stratified by Manager and Vendor. That is, regardless of the Month or Product filtered, the Amount of Active Customers amount in the Month should not be changed. I believe that this is due to the way in which I constructed these calculations, but I did not find any other alternative to arrive at this result.

Wrong Values

Filter by Month

Filter by Product

How can I solve this?

• ###### 1. Re: Running Count Distinct with Fixed Dimensions, Tableau Version 10.5

Hello Thiago,

I reviewed the workbook but I am not understanding the desired calculations.  I think what you want is possible with the use of the window_sum() calc to include the previous 5 months with the current month but the calcs I see in here use a parameter (which could be used in the window_sum().

One resource to check out quickly is Custom Time Frame + Relative Filter Example  in the Workbook & Calculation Library

I hope the examples there get you going but if not, could you provide a few examples of the outcome expected in each field - maybe just in an image?

Patrick