Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum after collapse

Hello Qliks,

I have the problem with creating expression. Below, you see 2 tables, first before a collapse Dim 1, and second after. How should look like expression to achieve an effect like in table 2?

Table 1:

DIM 1= Year

DIM 2= ACTDIM2=FCT
12

Table 2 :

DIM 1
1

For the situation where DIM1 has two values in DIM2 (ACT and FCT), sum after collapse just these values where DIM2=ACT.

For the situation where DIM1 has one value in DIM2 (ACT ), sum after collapse just these values where DIM2=ACT.

For the situation where DIM1 has one value in DIM2 ( FCT), sum after collapse just these values where DIM2=FCT.


Regards

Jacek.

6 Replies
Kushal_Chawda

Can you post some sample data with expected output?

sunny_talwar

Would you be able to share some real data with the expectation of output from it?

balar025
Creator III
Creator III

Hi ,

You can use if(secondarydimensionality()=1,sum({<Dim2={'ACT'}>}Value))

Regards,

Ravi

Anonymous
Not applicable
Author

Hello,

It took some time :).

Regards

Jacek.

sunny_talwar

Which object are we looking at? and what is the output required here?

Anonymous
Not applicable
Author

We have one variable for 3 tables $(vRevenue).

In Table 1 after collapsing Year-Month for month 2017-May(2017-Jun - similar situation), should we achieve : 109 852, not like now 247 151.

In Table 2 after collapsing Year-Month for month 2017-May(2017-Jun - similar situation), should we achieve : 109 852, not like now 247 151. The same effect because is one store in sample)


In Table 3 after collapsing Short Name, should we achieve : 2 689 038, not like now 2 966 337.


Regards

Jacek.