Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have the following expression
Days OoS = count(if([Date Decarded]>0 AND [Resulting Stock]=0 and Branch='2002',([Product Code])))
I now need to take the result and multiply with retail price
I tried "sum( [Days OoS] * [Retail Price])" and "sum( count(if([Date Decarded]>0 AND [Resulting Stock]=0 and Branch='2002',([Product Code]))) * [Retail Price])"
Does not work.
Any ideas?
Regards
Fanie
please upload your sample file.
Fanie,
The problem here is that you're trying to use one aggregation function (count) within another(sum):
sum(count(...))
It is not logical, hence not working. To make it work, you have to aggregate the internal aggregation function by some dimensions:
sum(aggr(count(...),<Dim1, Dim2, ...>))
I can't tell you what fields you have to aggregate by. Try to figure it out. Or, upload sample file, as Manish says.
Regards,
Michael
Hi Fanie
Without seeing the file its difficult to grasp this issue. Can you share the qvw please?
Steve