Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I'm new to Qliksense dev and am currently struggling with a calculation I need to do.
I have data for companies that have users that log onto an online platform and do purchases.
Based on last logged in date I want to see per month how many companies are active (active meaning at least 1 user logged in in the last 3 months) so the following demo :
Last Logged In Date | Active Companies | |||||||
Company A | User 1 | 05/01/2024 | Jan | Feb | March | April | May | |
User2 | 07/04/2024 | 1 | 2 | 2 | 4 | 3 | ||
User 3 | 25/05/2024 | CompanyA.User1 | CompanyA.User1 | CompanyA.User1 | CompanyA.User2 | CompanyA.User2 + User3 since Company is distinct I count it once | ||
Company B | User 1 | 12/04/2024 | CompanyC.User1 | CompanyC.User1 | CompanyB.User1 | CompanyB.User1 | ||
Company C | User 1 | 01/02/2024 | CompanyC.User1 | CompanyD.User2 + User3 since Company is distinct I count it once | ||||
User2 | 06/08/2024 | CompanyD.User2 | ||||||
Company D | User 1 | 03/05/2024 | ||||||
User2 | 23/04/2024 | |||||||
User 3 | 25/06/2024 | |||||||
Any suggestions on how to do this calculation ?
Try
=Count(DISTINCT{$<User = {"=Count({1} User) >=1"}, [Log Date] ={">=$(=Addmonths(Max([Log Date]),-3)) <=$(=Max( [Log Date]))"}>} Company)
Hi @BrunPierre thank you for the quick response but when I add this calc to a bar chart , its not working out. Its just showing the distinct customer per month and not adding up the figures like the table I table I displayed above.