cancel
Showing results for 
Search instead for 
Did you mean: 

Error For Variable.

Former Member
0 Kudos

Hi Experts,

I want to develop one variable, for which i am facing error...needs your advise

below is my scenario

Material     Amount   Required Field amount/total  (variable i am facing error)

a                50           50/100   ?

b                30           30/100   ?

c                20           20/100   ?

                 

Total         100

What i did, i created one variable name it X  were i put sum(amount) and for my required field i created another formula name it Y  which is (amount/X)

but once i place it in the required field it is dividing the data on line item wise, hence giving me a required values as 1 for all the line item.


How can we obtain the required field were each line item amount is getting divided with the total i.e 100 ?


giving the required fields as


Material     Amount   Required Field

a                50           0.5

b                30           0.3

c                20           0.2

                 

Total         100

I hope i am clear with my requirement.



Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nayab,

Try below logic and check:

=[amount] / Sum([amount] For All [Material])

Regards,

Yuvraj

Former Member
0 Kudos

Hi Yuvraj,

Thanx for your reply...

i tried using your formula, when i am placing that variable field separately it is giving me total of the values which is fine, but when i place that variable with the material dimension it is counting total line item wise, hence giving me the value 1 for each row when divided.

is there any formula were we can fix the sum for the column and divide it by the line item values?

arijit_das
Active Contributor
0 Kudos

X =Sum([amount] ForAll ([Material]))

Required Field =[amount]/[X]

- If this does not work, please provide a snapshot of the block so that we can understand the context used for the measure.

Former Member
0 Kudos

i solved it by using this formula

=(Measure)/(Sum(measure)In Report)

It is working perfectly fine now!

Answers (0)