12 Replies Latest reply: Mar 4, 2016 6:30 AM by naveen kumar RSS

    mathematical in to qlikview expression

    naveen kumar

      Hello guys ,

      i trying to write a mathematical expression in to qlikview expression........





      Load Portshipment10130,000.009.20
      Load Portshipment20130,000.009.10
      Load Portshipment30140,000.009.25


      what i am looking is this irrespective of SHIP field:

                                      IN Mathematical Expression                                                    Qlikview Epression   

                                      30000*9.20+30000*9.10+40000*9.25                    HOW TO WRITE HERE                                                      

                                        30000+30000+40000                                         SUM({<PLACE={'Load Port'},STATUS={1}>}TOTAL QUANTITY)




        • Re: mathematical in to qlikview expression
          naveen kumar



            IN Mathematical Expression                                                    Qlikview Epression  

                  30000*9.20+30000*9.10+40000*9.25          HOW TO WRITE HERE                                

                         30000+30000+40000                   SUM({<PLACE={'Load Port'},STATUS{1}>}TOTAL QUANTITY)

          • Re: mathematical in to qlikview expression
            Avinash R

            Try like this


            SUM({<PLACE={'Load Port'},STATUS={01}>}QUANTITY*TM)/SUM({<PLACE={'Load Port'},STATUS={01}>}QUANTITY)

              • Re: mathematical in to qlikview expression
                naveen kumar

                Hello Avinash,

                thanks for your quick reply and correct answer.....i have one more query on that ,as i am showing sum of quantity irrespective of shipments in a textbox==100000..right

                so my requirement is when the client click on that particular textbox ,he what to see the breakup in another tab.....

                to move from one tab to another tab i known how to write trigger action.....but how to show break up...it doesn't matter whether we show in table or some other charts



                output should be like this when clik on text box





                  • Re: mathematical in to qlikview expression
                    Avinash R

                    Try like this :


                    1.Create a variable like vShow_shipment with value 0

                    2. In the text box add a action in the properties > and on the click set the variable to 1


                    3.Create a table box or straight table with the SHIP and QUANTITY as the fields ..

                    then go to chart properties > layout > conditional show> add the variable vShow_shipment

                    so when the user click on the text box it sets the variable to 1 so the chart will appear accordingly

                    4. To hide the chart you can add one more text box and set the action to set variable to 0

                    Or you may try the toggle button as well


                        • Re: mathematical in to qlikview expression
                          naveen kumar

                          Hello Avinash

                          sorry for annoying you ,one last question the one u said above will it possible in this scenario....

                          three diff text box::     Load Port                     Discharge                            Plant 

                                                       100000                               1000                                   3000


                          where ever user click on Load Port he should see load port breakups(SHIP,QUANTITY),

                          IF user click on Discharge he should see Discharge  breakups(SHIP,QUANTITY),

                          IF user click on Plant he should see Plant  breakups(SHIP,QUANTITY),


                          Load Portshipment10130,000.00
                          Load Portshipment20130,000.00
                          Load Portshipment30140,000.00

                          Discharge      shipment1              01                  100

                          Discharge      shipment4              01                  500

                          Discharge      shipment5              01                  400

                          Plant            shipment1              01                  1000

                          Plant            shipment4              01                  1000

                          Plant            shipment6             01                  1000

                          i think we need to write some expression and set diff variable values for each place .......is it possible to show all them in same table ....



                            • Re: mathematical in to qlikview expression
                              Avinash R

                              Yes it possible ....


                              create one more variable like vSelection  and based on the button click ..set the variable like if the user click's on the

                              Load Port text/button add action to set the vSelection  to Load port  .....

                              then in the Straight table add an expression like this sum({<PLACE={"=($(vSelection) "}>}1)


                              sum({<PLACE={"=($(=vSelection) "}>}1)

                              and hide the expression in the presentation tab


                              hope this helps you

                      • Re: mathematical in to qlikview expression
                        naveen kumar


                        what writing this expression :

                        =sum({<PLACE={'DISPATCH'},SHIP_STATUS={1}>}QTY_DAILY*TM)/sum({<PLACE={'DISPATCH'},SHIP_STATUS={1}>} TOTAL QTY_DAILY)



                        i am getting value like this in a textbox


                        any how it is correct one ,is it possible to display only two digits after the decimal point


                        in straight table we have number option ,but in TEXT BOX i dont see any number .....