Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

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

                                


                                                    

              

                        

31 Replies
kunkumnaveen
Specialist
Specialist
Author

Hello All,

Any more helps in  achieving this requirement

please

perumal_41
Partner - Specialist II
Partner - Specialist II

Try now

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

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

Not applicable

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

kunkumnaveen
Specialist
Specialist
Author

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)

kunkumnaveen
Specialist
Specialist
Author

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

perumal_41
Partner - Specialist II
Partner - Specialist II

I have attached application / please look it

kunkumnaveen
Specialist
Specialist
Author

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

kunkumnaveen
Specialist
Specialist
Author

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

perumal_41
Partner - Specialist II
Partner - Specialist II

same expression  only

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

screen shot look like

with out selection

With supplier selection A

kunkumnaveen
Specialist
Specialist
Author

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)

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

so do i need to add anything more