-
1. Re: How to see % of clients buying in current year and last year
Jim DehnerJan 29, 2018 9:04 AM (in response to Giorge Luiz)
Hi
see the attached - you need to create an lod to id customers that purchase in each year and then use that in a table calculation to look at successive years of purchase
first - i used count of order id in superstore
then
you can then sum that value using window-sum
it returns this
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
-
customer counts .twbx 1.2 MB
-
-
2. Re: How to see % of clients buying in current year and last year
Giorge Luiz Jan 29, 2018 9:25 AM (in response to Jim Dehner) -
3. Re: How to see % of clients buying in current year and last year
Jim DehnerJan 29, 2018 9:39 AM (in response to Giorge Luiz)
-
4. Re: How to see % of clients buying in current year and last year
Giorge Luiz Jan 29, 2018 9:54 AM (in response to Jim Dehner)This isn't the correct number.
Using my original calculation:
SUM(
IF
{FIXED [Customer ID] : COUNTD(IF YEAR([Order Date]) = 2011 THEN [Order ID] END)} > 0
AND
{FIXED [Customer ID] : COUNTD(IF YEAR([Order Date]) = 2012 THEN [Order ID] END)} > 0
THEN 1
ELSE 0
END)
/
MAX({COUNTD(IF YEAR([Order Date]) = 2011 THEN [Customer ID] END)})
The result is 43,69% and I already confirm it.
Using the calculation below:
COUNTD customer
{ FIXED [Customer Name],year([Order Date]):countd([Order ID])}
window sum count
(window_sum(
if LOOKUP(min([COUNTD customer]),0) >0 and
LOOKUP(min([COUNTD customer]),1)>0 then 1 else 0 end ))
/
SUM({fixed year([Order Date]) : countd([Customer Name])})
I get the result below:
Which is not correct.
-
5. Re: How to see % of clients buying in current year and last year
Usman Ali Jan 29, 2018 10:04 PM (in response to Giorge Luiz)Hi Giorge,
Are you looking for something like this in attached image ?
Please let me know if this helps out
Regards
Raja Usman Ali
-
Current and previous year sales.jpg 154.5 KB
-
-
6. Re: How to see % of clients buying in current year and last year
Giorge Luiz Jan 30, 2018 4:07 AM (in response to Usman Ali)Hi Usman,
I think your solution will solve my problem.
Can you attach your workbook so I can see the how did you get there?
Thank you! -
7. Re: How to see % of clients buying in current year and last year
Usman Ali Jan 30, 2018 4:25 AM (in response to Giorge Luiz)1 of 1 people found this helpfulHi Giorge,
Please have a look on attached workbook developed in Tableau Desktop 10.4
Please mark this as correct answer and helpful if this solves your problem
Regards
Raja Usman Ali
-
8. Re: How to see % of clients buying in current year and last year
Giorge Luiz Jan 31, 2018 12:26 PM (in response to Usman Ali)Thank you, Usman.
It's not the exactly same thing that I was trying to achieve but it worked pretty well. My client liked it.
Giorge Caique