Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
sum of Sales for latest 5 dates..Please note ..I want sales for top 5 date sales....also these dates need not to be consecutive...please see the raw data table here..I want to build bar chart showing top 5 dates
Raw Data | Sorted Data | I want top 5 latest dates (recent 5 dates) | |||
Date_D | Sales | Date_D | Sales | ||
7/28/2015 | 1952 | 11/30/2016 | 1014 | Date_D | Sales |
4/20/2016 | 365 | 11/24/2016 | 1241 | 11/30/2016 | 1014 |
7/3/2015 | 1327 | 9/14/2016 | 1474 | 11/24/2016 | 1241 |
1/14/2016 | 1896 | 4/20/2016 | 365 | 9/14/2016 | 1474 |
3/10/2016 | 775 | 3/10/2016 | 775 | 4/20/2016 | 365 |
1/18/2015 | 1821 | 2/17/2016 | 1029 | 3/10/2016 | 775 |
10/26/2015 | 1258 | 2/4/2016 | 142 | ||
10/9/2015 | 1722 | 1/14/2016 | 1896 | ||
11/24/2016 | 1241 | 10/26/2015 | 1258 | ||
9/14/2016 | 1474 | 10/9/2015 | 1722 | ||
2/4/2016 | 142 | 8/9/2015 | 1161 | ||
8/9/2015 | 1161 | 7/28/2015 | 1952 | ||
11/30/2016 | 1014 | 7/3/2015 | 1327 | ||
1/11/2015 | 1642 | 6/6/2015 | 1715 | ||
6/6/2015 | 1715 | 1/18/2015 | 1821 | ||
2/17/2016 | 1029 | 1/11/2015 | 1642 |
You can try this..
=sum({<Date_D={'>=$(=Date(max(Date_D,5)))'}>}Sales)
sample attached
This is the expression I provided you before (bar chart for sales with 5 latest dates)
Sum({<Date_D = {">=$(=Date(Max(Date_D, 5), 'M/D/YYYY'))"}>} Sales)