Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregating problem

Hi..,

Fruitshop

FruitName

Share

Date

shop1

apple

30

2/12/2009

shop1

grape

20

2/12/2009

shop1

pineapple

9

2/12/2009

shop1

banana

16

2/12/2009

shop1

apple

23

3/12/2009

shop1

grape

12

3/12/2009

shop1

pineapple

37

3/12/2009

shop1

banana

10

3/12/2009

we hav data for 4shops.we need to calculate average of each fruit of each shop of particular date range(which will be captured dynamically by the user).If user selects 2/12/09 to 3/12/09 date range,then the average will be lik this for shop1.

fruitname apple grape pine apple banana

avg_share 26.5 16 23 13

avg_share=aggr(avg({<Date Range>}Share),FruitName,Fruitshop)

so i hav to get the table as

Fruitshop

shop1

shop2

ShareOf

No.of fruit types

%total

No.of fruit types

%total

0-20%

2

50%

null

null

20-40%

2

50%

null

null

40-60%

null

null

null

null

60-80%

null

null

null

null

80-100%

null

null

null

null

Grand total

4

100%

null

null



"ShareOf" is a calculated dimension.

The problem is in calculating "%total".

If i am using expression for %total =aggr(sum({<Date Range>}FruitName),FruitShop) the result is lik

Fruitshop

shop1

shop2

ShareOf

No.of fruit types

%total

No.of fruit types

%total

0-20%

2

100%

null

null

20-40%

2

100%

null

null

40-60%

null

null

null

null

60-80%

null

null

null

null

80-100%

null

null

null

null



plz suggest us ....

0 Replies