

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sm of two columns
Hi,
I have a problem i.e I want to create a column that has the sum of two columns of data that is loaded in the application.
The sample data is given here below:
This data is loaded in my Qlk Application. I want to create an another column and to present it in qlik pivot table that sums two other column means
(First year = 1st Sem+2nd sem, Second Year = 3rd Sem + 4th Sem)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so you always have 8 semesters to sum?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
If you have 1st Sem ,2nd Sem .. as your expressions use
First Year=Column(1) + Column(2)
or
First Year=[1st Sem]+[2nd sem]
If you have 1st Sem ,2ndSem ..as your Dimensions use
First Year =Sum([1stSem])+Sum([2ndSem])
Regards
Raman Rastogi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would probably add a RANGESUM* in there in case there is any possibility of a Null() or some text creeping in to the data.
First Year= Rangesum(Column(1) , Column(2))
or, more generally,
First Year =Rangesum (Sum([1stSem]) , Sum([2ndSem]))
*Remember:
10 + 5 = 15
10 + 'Example' = Null()
10 + Null() = Null()
Rangesum(10, 5) = 15
Rangesum (10 , 'Example') = 10
Rangesum (10, Null() ) = 10


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
no it varies sometimes they are only 4 sem, sometimes 6 but mostly they are 8.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just re-read your question and noticed you want to do it in a Pivot Table.
I'm not sure the (Column(1) + Column(2)) approach will work in a Pivot Table, so it would be better to explicitly define which fields you want to sum.
(An even better approach would be to perform the sums in the load script itself.)
