Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I want to show last 12 month sales of products based on the top 5 products sold in the current month.
Thanks in advance.
Try like this
Sum({<Products = {'$(=Rank(products)<=5)'}, month = {'$(=AddYears(Max(month),-1))'}>} sales)
Hi Anil,
If we use this Formula in an expression it will return only the current month data. I want to show the last 12 month trend of these top products.
May be like this:
Sum({<Products = {"=Rank(Sum({<MonthYear = {'$(=Date(Max(MonthYear)))'}>}Sales)) < 6"}, MonthYear = {"$(='>=' & Date(MonthStart(Max(MonthYear), -12)) & '<=' Date(Max(MonthYear)))"}>} Sales)
Here, create MonthYear field in the script like this
LOAD TempDate,
Date(MonthStart(TempDate)) as MonthYear
FROM ....
I like the way you derive solution... The most simplified form..
Would you mind, Please share the application?