Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement to find out sales of only new customers in a specific period. Could you please help me out with set analysis expression. I have attached the sample.
For the period Jan count should be 2, Feb 1, mar 2
Thanks,
Mc
Hi,
Try this expressions
Jan : =Sum({$<ODate={">=2014-01-01<=2014-01-31"}>} Aggr(If(MonthName(Min(TOTAL <sCustomer> ODate)) = MonthName(ODate), Sum(sSales)), sCustomer, ODate))
Feb: =Sum({$<ODate={">=2014-02-01<=2014-02-28"}>} Aggr(If(MonthName(Min(TOTAL <sCustomer> ODate)) = MonthName(ODate), Sum(sSales)), sCustomer, ODate))
Mar: =Sum({$<ODate={">=2014-03-01<=2014-03-31"}>} Aggr(If(MonthName(Min(TOTAL <sCustomer> ODate)) = MonthName(ODate), Sum(sSales)), sCustomer, ODate))
Regards,
Jagan.
Hi,
Arrive a flag in script for new customers and use it in set analysis, please find attached file for solution.
Regards,
Jagan.
Thanks Jagan. I don't want to modify the script now as I have a complex model. Isn't it possible to do directly from front end?
Thanks,
mc
Hi,
Try this expressions
Jan : =Sum({$<ODate={">=2014-01-01<=2014-01-31"}>} Aggr(If(MonthName(Min(TOTAL <sCustomer> ODate)) = MonthName(ODate), Sum(sSales)), sCustomer, ODate))
Feb: =Sum({$<ODate={">=2014-02-01<=2014-02-28"}>} Aggr(If(MonthName(Min(TOTAL <sCustomer> ODate)) = MonthName(ODate), Sum(sSales)), sCustomer, ODate))
Mar: =Sum({$<ODate={">=2014-03-01<=2014-03-31"}>} Aggr(If(MonthName(Min(TOTAL <sCustomer> ODate)) = MonthName(ODate), Sum(sSales)), sCustomer, ODate))
Regards,
Jagan.