I need to show cumulative sales for certain product type.I wrote following expression it is giving error:
Running-total ([Order Item Details].[Order Item Details].[Net Sale Item Qty] for (case when [Order Item Details].[Application].[Platform Name] ='ABC' then
[Order Item Details].[Order Item Details].[Net Sale Item Qty]
else
null)
end
)
and if i need to show monthly,quaterly,yearly cumulative sales separately,how this case statement should be written
Appreciate your help
I wrote this expression for week up to yesterday
if ([Order Item Details].[Order Source].[Order Source]='GHJ'
and [Order Item Details].[Application].[Platform Name]='ABC'
and ([Order Item Details].[Activity Date].[Short Date] between _add_days (current_date,-7) and _add_days(current_date,-1)))
then
(running-total([Order Item Details].[Order Item Details].[Net Sale Amt (USD)]))
else
(0)
But it is giving incorrect results.Thanks
What happens when you apply the running-total over the entire If.. then.. else.. statement?
The expression is validated but values i am getting are incorrect.Thanks
Any chance you can put the logic in a filter instead of in the case. Running aggregates are computed on the server AFTER fetching the data-set, which in your case may be the cause of misaligned data
I think this logic woudn't work in filter as read somewhere this should be avoided in filters,moreover,i need to show this running total column in report.Thanks
I do not mean putting the if then else and running-total in a filter :o
Make sure you use a filter to create the proper dataset (ordering is relevant too) before the running-total is done by the server
Finally,Two Data Items and my First Data Item Expression :
if ([Order Item Details].[Order Source].[Order Source]='iTunes')and ([Order Item Details].[Activity Date].[Short Date] between _add_days (current_date,-7) and _add_days(current_date,-1)))
then
([Order Item Details].[Order Item Details].[Net Sale Amt (USD)]) else(0)
And the second Data Item Expression :
running -total(if ([Order Item Details].[Application].[Platform Name]='iPad' )) then (First Data item) else (0)
I am not sure whether it is right.Thanks