31 Replies Latest reply: Apr 12, 2016 2:27 AM by naveen kumar

# how to write expression for percentage

Hello All,

suppose if i have a table data like this

supplier     accepted   rejected   exception accepted        total                ENSTEHDAT

a                  50              25                 25                    100               10/03/2015

a                100             50                 50                    200               15/004/2015

b                   25             25                50                    100               10/03/2015

b                  50              25                25                    100                15/004/2015

what my requirement is i want known what percentage of  each supplier lots were accepted,rejected, exception from total for that particular period

i mean suppose i select date range from 01/03/2015 to 01/05/2015,and accepted value from decision field   then i should see

accepted=   150(50%)    (out of 300)         75(40%)  (out of 200)

a                                  b

rejected value from decision field rejected= 75(25%)    (out of 300)         50(20%)  (out of 200)

a                                  b

exception accepted value from decision field exception accepted=   75(25%)    (out of 300)         75(40%)  (out of 200)

a                                  b

so in a bar chart if i take two dimension:1)supplier

2)decision (as values accepted, rejected ,exception accepted)

expression   :1)=count({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>total)

2)percentage?

thanks

naveen

• ###### Re: how to write expression for percentage

There is no decision field, so you will need to do this as three expressions:

For accepted:

```Count({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} TOTAL <supplier> accepted) /
Count({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} TOTAL <supplier> total)
```

And do the same for the other two decision values

• ###### Re: how to write expression for percentage

is it possible to write single dynamic expression for three values (accepted,rejected,exception accepted)

because i need to display dimensions 1)supplier

2)decision

is it possible by keeping two dimesion and single expression instead of three

• ###### Re: how to write expression for percentage

Naveen,

Fist of all there is two way when  you say when I select that means the percentage is without any dimension that means you are not distributing the percentage on any dimension. Hence to represent this you need a text box object and quote your expression for each accepted ,rejected and exception .

Now the next thing is to distribute it on supplier    .

Hence it can be a straight table.

• ###### Re: how to write expression for percentage

i am showing it in bar chart so i need to show same with two dimensions

1)supplier

2)decision

• ###### Re: how to write expression for percentage

Hi Navven,

Try below for percentage expr

Sum({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}total)

/Sum({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} Total total)

• ###### Re: how to write expression for percentage

this expression compare and show percentage of only suppliers of that chart,but i need percentage expression which compare between the values of decision filed of same supplier

i mean suppose i select date range from 01/03/2015 to 01/05/2015,and accepted value from decision field   then i should see

accepted=   150(50%)    (out of 300)         75(40%)  (out of 200)

a                                  b

rejected value from decision field rejected= 75(25%)    (out of 300)         50(20%)  (out of 200)

a                                  b

exception accepted value from decision field

exception accepted=   75(25%)    (out of 300)         75(40%)  (out of 200)

a                                  b

• ###### Re: how to write expression for percentage

Now Try

Sum({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}total)

/Sum({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} Total <[decision filed]>  total)

• ###### Re: how to write expression for percentage

hi ,please find the attachment ,with slides,if you see that a supplier called JAY Ganesh Chemicals

for this supplier  i am getting  accepted%=66.7

rejected%=60

exception%=50

total              176.7%    but it has to be altogether 100% only

count({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}PRUEFLOS)

/count({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} Total <Decision>PRUEFLOS)

• ###### Re: how to write expression for percentage

Hello All,

Any more helps in  achieving this requirement

• ###### Re: how to write expression for percentage

Try now

count({\$<YEAR=,QUATERS=,name1=,Decision=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}PRUEFLOS)

/count({\$<YEAR=,QUATERS=,name1=,Decision=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} Total <Supplier Name>PRUEFLOS)

• ###### Re: how to write expression for percentage

dude ,i am getting an error,after that expression

dimensions:1)name1    (supplier)

2)decision

expression1=count({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}PRUEFLOS)

wxpression2    =  count({\$<YEAR=,QUATERS=,Decision=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}PRUEFLOS)

/count({\$<YEAR=,QUATERS=,Decision=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} Total <name1>PRUEFLOS)

• ###### Re: how to write expression for percentage

I have attached application / please look it

• ###### Re: how to write expression for percentage

so i dont have licence version,if it is expression can u write it down for me,thanks

• ###### Re: how to write expression for percentage

so i dont have licence version,if it is expression can u write it down for me,thanks

• ###### Re: how to write expression for percentage

same expression  only

Sum(Value)
/
Sum({<Decesion=>} Total <supplier>Value)

screen shot look like

with out selection

With supplier selection A

• ###### Re: how to write expression for percentage

IF this is working for you ,then i think problem is from my side ,i mean i haven't clear out how my data is,

this requirement is a level 2 requirement  , what i mean is after clicking on level 1 it will bring me to level2

so category and decision filed are selected at level1 based up on that selection the level 2 shows only those supplier which full fill thet category and decision values

level1 dimension:1)category

2)decision

expression

=count({\$<MaterialName=,YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}PRUEFLOS)

level2  dimension:1)name1

2)decision

expression:1)=count({\$<YEAR=,QUATERS=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}PRUEFLOS)

2)

count({\$<YEAR=,QUATERS=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>}PRUEFLOS)

so do i need to add anything more

• ###### Re: how to write expression for percentage

step by step will do

Step 1 :

count(PRUEFLOS)

/ count(Total  <name1>  PRUEFLOS)

if you get step 1 value then implement 2

Step 2 :

count({\$<YEAR=,QUATERS= >}PRUEFLOS)

/count({\$<YEAR=,QUATERS=>} Total <name1> PRUEFLOS)

if you get step 2 value then implement 3

Step 3 :

count({\$<YEAR=,QUATERS=,Decision= >}PRUEFLOS)

/count({\$<YEAR=,QUATERS=,Decision= >} Total <name1> PRUEFLOS)

if you get step 3 value then implement 4

Step 4 :

count({\$<YEAR=,QUATERS=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} PRUEFLOS)

/count({\$<YEAR=,QUATERS=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} Total <name1> PRUEFLOS)

• ###### Re: how to write expression for percentage

same thing coming out

• ###### Re: how to write expression for percentage

which step ypur getting error ? is possible to upload sample application

• ###### Re: how to write expression for percentage

its about 13 MB after reducting  ,i dont think it will get up loaded but still i will try

• ###### Re: how to write expression for percentage

Please find the sample file,my requirement is at level2

i mean when u click on summary charts it will bring you  materiel wise    after  selecting material it will bring you to supplier where i need this percentage thing

• ###### Re: how to write expression for percentage

Ur expression should be

=sum({\$<YEAR=,QUATERS=,name1=,ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>total)/ sum(TOTAL total)

Also , select the relative checkbox  in the expression tab (to show it in percentage).

Regards,

Anjali Gupta

• ###### Re: how to write expression for percentage

No it not working ,i hope u known the  requirement ,please go through the slide it clear up the  requirement

• ###### Re: how to write expression for percentage

expression working

count({\$<YEAR= , Quarter=, ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} PRUEFLOS)

/
count({\$<YEAR=,Quarter=,Decision=, ENSTEHDAT={">=\$(vFromdate)<=\$(vTodate)"}>} Total <name1> PRUEFLOS)

snap shot

• ###### Re: how to write expression for percentage

HI looks like its working ,if you have done this in my file will u post it back,i will open it in me mate laptop

• ###### Re: how to write expression for percentage

Currently I am also working personal edition . so I am un able to your application. but I took binary load  in to test app and  then tested expression .

• ###### Re: how to write expression for percentage

i just copied and pasted your expression ,but still i am getting what you getting,is it possible to send at least the file you worked on plz

thanks