Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a data table below:
Customer | Product | Month | Year | Duration | Age | Gender |
---|---|---|---|---|---|---|
12345 | 01 | 03 | 2016 | 1 | 50 | F |
23465 | 01 | 03 | 2016 | 2 | 40 | M |
12654 | 01 | 03 | 2016 | 4 | 50 | F |
13546 | 02 | 03 | 2016 | 5 | 20 | F |
16544 | 02 | 03 | 2016 | 7 | 45 | M |
I want to calculate number and percentages of customers based on issue month/year and duration.
For example:
5 customer bought products in 3/2016 that has duration of 1 or longer
3 customer bought products in 3/2016 that has duration of 4 or longer
3 out of 5 customers with durations 4 or longer = 60%
As duration increase, percentages should decrease.
Duration | count | percentage |
---|---|---|
1 | 5 | 100% |
2 | 4 | 80% |
3 | 3 | 60% |
4 | 3 | 60% |
I try using duration as dimension and calculate the percentages in expression. But since denominator is calculated using all duration, it doesn't work..
I'm really new at this, any help would be great!!!
Thanks!
May be like this for denominator:
Count(DISTINCT TOTAL Customer)
or
Count(DISTINCT TOTAL <Month, Year> Customer)