-
1. Re: Best sales year and month
Simon RuncJan 5, 2018 10:12 AM (in response to Andrew Morgan)
hi Andrew,
I think this does what you require. I've worked them both up using LoDs, but there are (as always) many ways we could have done this.
For best year I did the following
[Best Year Per Person]
IF {FIXED [Person], Year([Order Date]): SUM([Sales])}
=
{FIXED [Person]: MAX
(
{FIXED [Person], Year([Order Date]): SUM([Sales])}
)
}
THEN Year([Order Date])
END
and then for best month
[Best Month Per Person]
IF {FIXED [Person], month([Order Date]): SUM([Sales])}
=
{FIXED [Person]: MAX
(
{FIXED [Person], month([Order Date]): SUM([Sales])}
)
}
THEN datename('month',[Order Date])
END
Hope that solves your question, and makes sense.
-
Best month_SR.twbx 1.2 MB
-
-
2. Re: Best sales year and month
Andrew Morgan Jan 10, 2018 4:47 AM (in response to Simon Runc)Hi Simon,
Thanks for the reply. Best year is working fine but best month is not giving the desired result. I want best month in each year.
Please help.
AM