Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hey all,
i have a bar chart that has a dimenssion a. Cyclic group inside it year month day and a second dimenssion (type:local
international)
need to calculate each Time i change the dimenssion calculate the % as :
if the dimension is year >>>> sum(amount)/sum(TOTAL<year>amount)
if dimension is month >>>> sum(amount)/sum(TOTAl<month>amount)
if dimenssion is day>>>>sum(amount)/sum(TOTAL<day>amount)
hope you can help
May be try this:
Sum(amount)/Sum(TOTAL <$(=GetCurrentField('CycleGroupName'))> amount)
sum(total {<give the dimension>}amount)
With a brace and quotes correction:
Sum(amount)/Sum(TOTAL <$(=GetCurrentField("CyclicGroupName"))> amount)
Try like this
store your cyclic dimension selection in a variable
like
vselection = GetCurrentField('CycleGroupName')
then try like this in the expression
Sum(TOTAL <$(vselection )> amount)
I still feel that single quotes should work tresesco. Thanks for pointing out the parenthesis issue
Have you tried? With me it doesn't work.
Right now, I haven't, but I have feeling that it did work in the past. But I guess you have tested it more recently, then you must be right. Memories are sometimes deceiving .
tresesco you were right. Single quotes doesn't work. We either need double quotes or square brackets. In addition if we have spaces between the field name we might need to add square brackets within the dollar sign expansion:
=Sum(Amount)/Sum(TOTAL <$(='[' & GetCurrentField([Cycle Group]) & ']')> Amount)
Attached application, I tried to test it out.
sum(sales)/sum(total{<cyclic group name>} sales)
try this one