Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

aggr

Hi gurus,

I know the only solution to solve my problem is to use aggr, but I have not use aggr before and have no idea on how to make it works

TypeNumber of PeopleVacation Stay in DaysTotal Days(Column(2) * Column(3))
Male4520
Male414
Male51260
Male339
Male7214

The sum of Total Day will be 107 after adding up the total days. This figure of 107 is the desired output for me for a specific column.

Here is my desired table layout

TypeTotal Number of PeopleTotal Days
Male4+4+5+3+7 = 23107
Female1290
Others731

I believe I need to use aggr but anybody can help me out on the expression that I should use?

Thanks very much in advance

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Yes, I got 30, 44, ...

Check attached.

View solution in original post

14 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Considering the first table as your data.

     Create a chart with dimension as Type

     Expressions as

     1.  Sum(Number_of_people)

     2. Sum(Number_of_people * Vacation_Stay_in_Days)

     If not kindly provide your data.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
n1ef5ng1
Creator
Creator
Author

You are right on the first table with the expreession. With the value on the second expression, I will then use subtotal to get the total.

However, my dersire output is the second table, the figure are derived after i subtotal on the second expression. (see 107 figure in bold)

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Kindly send your sample qvw file for more understanding.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
n1ef5ng1
Creator
Creator
Author

for now I can't send a sample file yet.

basically the first table is like a virtual table to total up the value

I will try to upload later

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     It will be helpful if you can create the same situation on test data and upload here, that will give us a better view of your problem.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable

Hi

1 - Create a straight table chart, add 'Type' as dimension.

2 - Add an expression AGGR( SUM(NumberofPeople), Type)

I hope this helps!

Regards

MultiView

rustyfishbones
Master II
Master II

Here is a video on using aggr function

http://www.youtube.com/watch?v=Hmjm3vQX9HE&sns=em

Hope it helps

n1ef5ng1
Creator
Creator
Author

unable to provide sample data,

not sure if I have stated the problem clearly,

hopefully someone can help in this

Basically I want the virtual table A to derive the total number of days to be 107

and create a expression(which i believe is AGGR), to state 107 without any additional column or table

n1ef5ng1
Creator
Creator
Author

Attached file as below,

In the qlikview file, there is two table call desire table and Total Box.

I having problem putting a value on Total Box Dwell Days in Desire Table

I am able to achieve the value if I can create a table call Total Box,

The value for Over Type,Month 10, will be (3*2) + (6*4) = 30,

Value fo Important Type, Month 10, will be (4*1) + (8*5) = 44

Thus, the value of 30 and 44 should be in Desire table,

Thanks very much!

I believe is aggr but I have no clue on how to do it