Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a line chart for sales and a table where you can see the detail for every sale from a particular sales rep.
What I need is to get the max and min values (sales) for a specific sales rep with the corresponding date...
I've tried it using the following expressions in a text box:
MAX: =MAX(Sales)
DATE (From MAX): =DATE(SUM(AGGR(FIRSTSORTEDVALUE(Date,-Sales),[Sales Rep])),'MM/DD/YYYY')
MIN: =MIN(Sales)
DATE (From MIN): =DATE(SUM(AGGR(FIRSTSORTEDVALUE(Date,Sales),[Sales Rep])),'MM/DD/YYYY')
The expression for DATE works well when I have one single value for the MAX/MIN.
In the case of MAX, the corresponding date for 60985.12 is 01/28/2010.
But, in the case of MIN, that it's 0 for sales rep Amalia Craig, there are multiple dates, and the output shows 12/30/1899.
Do you know if there's any way to show all the possible dates for the MAX/MIN sale?
Please, find QVW attached.
Thank you!
You can concatenate the dates and use the aggr function to return that list of dates with the firstsortedvalue function. See this discussion for a similar problem: Re: FirstSortedValue issue
Could you please give me an example? Thanks.
I already did.