Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi People,
I have a request to display returning customers as a dynamic KPI, meaning, for the previous 6 month of a selected date.
The user selects a product, and a returning customer would be a customer that bought one or more product after the first buying date of the selected product. I'm struggling with a Set Analysis expression to count the relevant customers.
I have managed to calculate the number of return dates:
Sum(aggr(Count({<Creation_Date = p({<Product_Group=, Creation_Date = {">$(=min(Creation_Date))"}>} )>}DISTINCT Creation_Date),Customer))
In order to count the relevant customers I added:
=Count({< Customer = {"Sum(aggr(Count({<Product_Group=, Creation_Date = p({<Creation_Date = {'>$(=min(Creation_Date))'}>})>}DISTINCT Creation_Date),Customer))>0"}>}DISTINCT Customer)
But the above doesn't work: the result is 0.
Can someone help me figure out why?
Attached are the model & data.
Thanks in advance!
Can you share us the demonstrate QVW as well using attached source.
Sum({<DateField={">=$(AddMonths(Max(DateField), -6))<=$(=Max(DateField))"}>} Measure) // This will return last 6 months data
And then, Please explain what is the outcome you are expecting
Hi Anil,
Here is an example:
When the user selected "Bottles", the customers that have bought any products after the first Bottles buying date are returning. I attached the model.
Thanks!
@Anil_Babu_Samineni Hey man, here is another post, sorry, it appears notifications are still not working correctly, if you have a minute and can check the follow-up post, much appreciated sir. Thanks as always!
Regards,
Brett
Hi, Can you please tell us the outcome here after Bottles selection? and explain the logic behing for output?
Hi,
I have rephrased the issue in a different thread and it was resolved:
https://community.qlik.com/t5/QlikView-Creating-Analytics/Set-Analysis-with-nested-AGGR/td-p/1754779
Thanks for your help!
I have rephrased the issue in a different thread and it was resolved:
https://community.qlik.com/t5/QlikView-Creating-Analytics/Set-Analysis-with-nested-AGGR/td-p/1754779
Glad to hear, Anyway you can mark your reply as answer to close this thread !