Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have been trying to do get a total total cost:
ClassType | ClassTypeDesc | costWeight | No.Recs | Cost($) |
Total | 293 | |||
Sim | OPS1 | 1.5 | 1 | $1.50 |
OPS3 | 2.71 | 43 | $116.53 | |
OPSL4 | 3.35 | 92 | $308.20 |
The formula for getting the no of Records is
count(distinct{<ClassTypeName = { 'Sim'}>}([RecNo()])) |
How do I get the total COST which is costWeight * No. Recs
I have read about aggr function but I do not know where to apply the function.
Thank you for any help you can give.
Like this:
=Sum(Aggr(costWeight * Count({<ClassTypeName = { 'Sim'}>} DISTINCT RecNo()]), ClassType, ClassTypeDesc))
If this is in a chart with more dimensions, then you need to include all the chart dimensions in the list of dimensions for the Aggr()
Like this:
=Sum(Aggr(costWeight * Count({<ClassTypeName = { 'Sim'}>} DISTINCT RecNo()]), ClassType, ClassTypeDesc))
If this is in a chart with more dimensions, then you need to include all the chart dimensions in the list of dimensions for the Aggr()
Thank you Jonathan - worked beautifully,
Now all I have to do is study it and figure out why
Thanks again
Jo