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

# mathematical in to qlikview expression

Hello guys ,

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

 PLACE SHIP STATUS QUANTITY TM Load Port shipment1 01 30,000.00 9.20 Load Port shipment2 01 30,000.00 9.10 Load Port shipment3 01 40,000.00 9.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

Thanks

naveen

• ###### Re: mathematical in to qlikview expression

SORRY FOR THE ABOVE MESS EXPRESSION

IN Mathematical Expression                                                    Qlikview Epression

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

• ###### Re: mathematical in to qlikview expression

Depends on the context. For a standalone version:

• ###### Re: mathematical in to qlikview expression

Hello jonathan,

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

 SHIP QUANTITY shipment1 30,000.00 shipment2 30,000.00 shipment3 40,000.00

thanks

naveen

• ###### Re: mathematical in to qlikview expression

=sum(Quantity*TM) / sum({1<pass all Possible value on which Selection Should Change>}Total Quantity)

• ###### Re: mathematical in to qlikview expression

you may try this as well?

=sum(QUANTITY*TM) / sum(total QUANTITY)

• ###### Re: mathematical in to qlikview expression

Try like this

• ###### Re: mathematical in to qlikview expression

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

 SHIP QUANTITY shipment1 30,000.00 shipment2 30,000.00 shipment3 40,000.00

thanks

naveen

• ###### Re: mathematical in to qlikview expression

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

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),

 PLACE SHIP STATUS QUANTITY Load Port shipment1 01 30,000.00 Load Port shipment2 01 30,000.00 Load Port shipment3 01 40,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 ....

thanks

naveen

• ###### Re: mathematical in to qlikview expression

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

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

or

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

and hide the expression in the presentation tab

hope this helps you

• ###### Re: mathematical in to qlikview expression

HI

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

10.4567387776

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

10.45......enough

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