Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sebastian_fager
Contributor III
Contributor III

Running total costumers

Hi!

Have the following data:

Costumer; Product;      MeasuringPoint;      Date;                 Branch

15;               X;               1;                    2016-05-02;                   ME

15;               X;               1;                    2016-07-13;                   ME

15;               Y;               0;                    2016-11-11;                    ME    

15;               Z;               1;                    2016-12-02;                   ME

17;               X;               0;                    2017-02-06;                   AX

17;               X;               0;                    2016-12-10;                   AX

18;               X;               0;                    2017-03-07;                   AX

18;               Z;               1;                    2016-07-09;                   AX    

19;               X;               0;                    2016-05-11;                   IU

The data tell us which costumer have which product in store(MeasuringPoint=1) or not and which date the control was made.

count(distinct Costumer) - Total customers

count({$<[Date]=>} distinct Date) - to calculate total costumers without the Date interfering

What i need is a measure for running total for customers(distinct). If i choose the Date 2016-12-03 i want all the visited costumers from that date, which is in this case 3.

The total visited consumers is 4, so we have visited one more consumers since the Date we choice.

And the measure need to work if a choose to just look at one branch and/or a product.

Have tried different kind of rangesum, above, aggr but can't make it work..

4 Replies
sunny_talwar

You are trying to get this done in a text box object or a chart?

sebastian_fager
Contributor III
Contributor III
Author

Hi,

In a barchart and table.

sunny_talwar

So the table will only show a single date with Count of customers?

sebastian_fager
Contributor III
Contributor III
Author

Hi,

The selected date should work like a arbitrary reference, so i should see all the dates and values before the selected date.

If it's not possible or to hard the table will show only the selected date and a total for the measure.

The bar chart need to be accumulated and distributed per month.