
Re: Calculation in straight table
Alessandro Saccone Mar 25, 2014 5:26 AM (in response to Chanel Choo)Here it is

Table Calc.qvw 150.5 K

Re: Calculation in straight table
Chanel Choo Mar 25, 2014 10:31 PM (in response to Alessandro Saccone )Thanks for the suggestion, but I want to get sum of TypeA which is 3+4+3 = 10, as well as sum of TypeB = 4 in the new column.


Re: Calculation in straight table
Sushil Kumar Mar 25, 2014 5:31 AM (in response to Chanel Choo)Try this:
Sum({$<available={1}>}F2*F3)

Re: Calculation in straight table
Chanel Choo Mar 25, 2014 10:33 PM (in response to Sushil Kumar)Thanks for the suggestion, is closer to solution now, but I want to get sum of TypeA which is 3+4+3 = 10. Is it possible to make it?


Re: Calculation in straight table
Shyamal Pandit Mar 25, 2014 5:39 AM (in response to Chanel Choo)You can use the following for calculating sum:
=Sum({$<available = {1}, F1 = {'Type A'}>} F2*F3)
Hope this helps!

Re: Calculation in straight table
Chanel Choo Mar 25, 2014 10:34 PM (in response to Shyamal Pandit )Thanks for helping but sorry, the formula is not working with the " F2*F3) “

Re: Re: Calculation in straight table
Shyamal Pandit Mar 26, 2014 2:23 AM (in response to Chanel Choo)oops!! strangely the symbol got converted, you can try the below modified expression:
=If(F1='TypeA' and available='1', Sum({<F1={'TypeA'}>}TOTAL F2*F3),
If(F1='TypeB' and available = '1',Sum({<F1={'TypeB'}>}TOTAL F2*F3)))This will not show anything in the rows where available is not 1, you can add 0 or '' per you requirement.
Hope this helps!

Re: Re: Calculation in straight table
Liron Baram Mar 26, 2014 5:45 AM (in response to Chanel Choo)have a look at the attachment

Table Calc.qvw 149.0 K




Re: Calculation in straight table
Sudeep Mahapatra Mar 25, 2014 5:42 AM (in response to Chanel Choo)Please take a look at the attachment. I've few questions. Do you just want to show the TypeA in the chart?
Do you just want to show the row where available =1, what about available =0 do you want that ignored in the row in the st Table?

T111862Table Calc.qvw 153.2 K

Re: Calculation in straight table
Chanel Choo Mar 25, 2014 10:41 PM (in response to Sudeep Mahapatra)Thanks for your questions and suggestion. I want to show the row where available = 1, and sum of the type in that row where available = 1.
so in the new column, i would like to see sum of TypeA which is 3+4+3 = 10 and TypeB = 4.
Thanks and best regards,
Chanel

Re: Re: Calculation in straight table
Rohit Koul Mar 26, 2014 2:43 AM (in response to Chanel Choo)Hi chanel,
I am not sure why you need such output where you can easily get with partial sum features.
anyways PFA I have done in all 3 forms may be helpful for you.

Table Calc.qvw 155.0 K




Re: Calculation in straight table
Julian Mudge Mar 25, 2014 11:39 PM (in response to Chanel Choo)Hi Chanel,
Does this do what you need it to do...
If(F1='TypeA',sum({<F1={'TypeA'}>}TOTAL F2*F3),sum({<F1={'TypeB'}>}TOTAL F2*F3))
Julian

Re: Calculation in straight table
Julian Mudge Mar 26, 2014 1:25 AM (in response to Julian Mudge)Sorry, Try this one. It does fit the sample data but may not easily scale to fit your full data set...
If(F1='TypeA',sum({<F1={'TypeA'}>}TOTAL F2*F3),
If(F1='TypeB',sum({<F1={'TypeB'}>}TOTAL F2*F3),sum({<F1={'TypeC'}>}TOTAL F2*F3)))


Re: Calculation in straight table
Ravi Kumar Mar 26, 2014 1:16 AM (in response to Chanel Choo)Try this
=Aggr(Sum(F2*F3),F1)

Re: Calculation in straight table
Prashant Sangle Mar 26, 2014 2:42 AM (in response to Chanel Choo)Hi,
Check attached File,
Regards,

Table Calc (1).qvw 149.0 K
