Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please help me...Is there something wrong in this expression.
Aggr(SUM({<Date = {">=$(=Date(Max(Date)-7,'DD-MMM-YYYY')))<=$(=Date(Max(Date)-7,'DD-MMM-YYYY'))"}>}Sales),Product)
its excluding last 7 days data. Actually I need only last 7 days data. instead of other
Thnx,
John
Assuming that your Date field is in DD-MMM-YYYY format.
SUM({<Date = {">=$(=Date(Max(Date)-7,'DD-MMM-YYYY'))<=$(=Date(Max(Date),'DD-MMM-YYYY''))"}>}Sales)
or
SUM(Aggr(SUM({<Date = {">=$(=Date(Max(Date)-7,'DD-MMM-YYYY'))<=$(=Date(Max(Date),'DD-MMM-YYYY''))"}>}Sales),Product))
Hi,
Try like
Aggr(SUM({<Date = {">=$(=Date(Max(Date)-7,'DD-MMM-YYYY')))<=$(=Date(Max(Date),'DD-MMM-YYYY'))"}>}Sales),Product)
Regards
Assuming that your Date field is in DD-MMM-YYYY format.
SUM({<Date = {">=$(=Date(Max(Date)-7,'DD-MMM-YYYY'))<=$(=Date(Max(Date),'DD-MMM-YYYY''))"}>}Sales)
or
SUM(Aggr(SUM({<Date = {">=$(=Date(Max(Date)-7,'DD-MMM-YYYY'))<=$(=Date(Max(Date),'DD-MMM-YYYY''))"}>}Sales),Product))
Tried this before.....its showing all the data...Any other Suggestions Max....
Thnx
John
What is the format of your DATE field?
Thnx Manish,
the second expression did the magic...cud u pls explain why Sum before Aggr ..made this work....
Thnx,
John
SUM(Sales) will create TotalSales
Aggr(SUM(Sales),Product) will create a virtual table with Product as Dimension and SUM(Sales) as Expression
But we need Total SUM(Sales) for All Products... so we need to again use SUM
SUM(Aggr(SUM(Sales),Product))
Excellent!!!