Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Location wise Avg

Hi All,

Avg Per day per Person should be bucketed

Data :-

DateLocationNameHandled
7/1/2015BlrRaj 11500
7/1/2015ChnRaj 21000
7/1/2015TJRaj 3600
7/1/2015ChnRaj 41000
7/3/2015TJRaj 31000
7/3/2015BlrRaj 1900
7/6/2015ChnRaj 2500
7/6/2015BlrRaj 5

1000

Avg Per person Per day to be bucketed as given below.

 

LocationRow LabelsAverage of HandledBucket
BlrRaj 112001000 - 1500
ChnRaj 2750500 - 1000
TJRaj 3800500 - 1000
ChnRaj 410001000 - 1500
BlrRaj 510001000 - 1500

Final Output:

Location0 - 500500 - 10001000 - 1500> 1500
Blr2
Chn11
TJ1
1 Solution

Accepted Solutions
puttemans
Specialist
Specialist

Latest version, with approximation of your needs I guess.

Kind regards,

Johan

View solution in original post

14 Replies
puttemans
Specialist
Specialist

Hello Rajesh,

And if you take location as a dimension, and '= count(Handled)' as expression in a chart, you don't get the result?

jonathandienst
Partner - Champion III
Partner - Champion III

Create a bucket field using an interval match or using code like this:

LOAD Date,

  Location,

  Name,

  Handled,

  If(Handled < 500, Dual('0-500', 0),

  If(Handled < 1000, Dual('500-1000', 500),

  If(Handled < 1500, Dual('1000-1500', 1000),

  Dual('>1500', 1500)))) As Bucket

FROM ....

Now use Bucket as the cross dimension and sort it numerically (the duals will keep the order correct).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
qlikmsg4u
Specialist
Specialist

find the attached file

Not applicable
Author

NO this will not work as I wanted Avg Handled and not Handled.

Raj 1 Avg Handled is 1200.How do i bucket teh Names basis teh avg handled as the bucket given by you

Not applicable
Author

NO this will not work as I wanted Avg Handled and not Handled.

Raj 1 Avg Handled is 1200.How do i bucket teh Names basis teh avg handled as the bucket given by you

Location0 - 500500 - 10001000 - 1500> 1500
Blr2
Chn11
TJ1

jonathandienst
Partner - Champion III
Partner - Champion III

Average per day, per person or both?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Avg Per day per Person should be bucketed

Data :-

 

DateLocationNameHandled
7/1/2015BlrRaj 11500
7/1/2015ChnRaj 21000
7/1/2015TJRaj 3600
7/1/2015ChnRaj 41000
7/3/2015TJRaj 31000
7/3/2015BlrRaj 1900
7/6/2015ChnRaj 2500
7/6/2015BlrRaj 5

1000

Avg Per person Per day to be bucketed as given below.

  

LocationRow LabelsAverage of HandledBucket
BlrRaj 112001000 - 1500
ChnRaj 2750500 - 1000
TJRaj 3800500 - 1000
ChnRaj 410001000 - 1500
BlrRaj 510001000 - 1500

Final Output:

Location0 - 500500 - 10001000 - 1500> 1500
Blr2
Chn11
TJ1
puttemans
Specialist
Specialist

sorry,

per day or per location? You show per location.

I've managed to calculate the averages, but have difficulties putting it in the right output you want.

Not applicable
Author

Hi,

Even teh averages is not correct