Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Total by dimenssion

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

9 Replies
sunny_talwar

May be try this:

Sum(amount)/Sum(TOTAL <$(=GetCurrentField('CycleGroupName'))> amount)

Anonymous
Not applicable

sum(total {<give the dimension>}amount)

tresesco
MVP
MVP

With a brace and quotes correction:

Sum(amount)/Sum(TOTAL <$(=GetCurrentField("CyclicGroupName"))> amount)

avinashelite

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)

sunny_talwar

I still feel that single quotes should work tresesco‌. Thanks for pointing out the parenthesis issue

tresesco
MVP
MVP

Have you tried? With me it doesn't work.

sunny_talwar

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 .

sunny_talwar

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.

Anonymous
Not applicable

sum(sales)/sum(total{<cyclic group name>} sales)

try this one