Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Compare Min/Max for Bucket

Hi

We have requirement for comparing a aggregated value on front end compare it with Min and Max and find the bucket(this bucket would be the Dimension for a chart)

Bucket Table would be

Row Num

Min

Max

Bucket

1

0

5

0-5

2

6

10

6-10

3

11

20

11-20

And Value aggregated on front end would be compared with min and max and Bucket should be selected e.g. value is 3 than 0-5 bucket would be selected.

This Bucket would be used as dimension in a chart.

Please advise how this can be implemented.

Regards,

ASP

21 Replies
Anil_Babu_Samineni

May be MaxString(Bucket)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
tresesco
MVP
MVP

Could you share a sample data?

vinieme12
Champion III
Champion III

Not sure if this is what you are after

Interval Match Feature/Function

https://community.qlik.com/search.jspa?q=interval+match&type=post

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Row Num

Provider ID

Patient ID

1

AA

11

2

AA

12

3

AA

13

4

BB

21

So I want to Count Patient per Provider e.g aggr(count(Patient),Provider) from above AA has 3 Patients.

Referring to Bucket table I should get “0-5” as 3>0(Min Value) and 3<5(Max Value),This will be Dimension

Now Expression would be how many Provider in each bucket. So “0-5” bucket has 1 Provider

I can write if Statement with hardcode values but client wants it dynamic, with just values in table changed buckets should change.

tresesco
MVP
MVP

How do you get min/max values?

passionate
Specialist
Specialist

Hi Anwar,

The best practice to achieve this is at load script.

You can use interval match to this in load script.

Is there any specific reason you want to do this on front end?

Regards,

Pankaj

passionate
Specialist
Specialist

Hi Anwar,

This will help you:

Sample:

Left join Table

Load Count([Patient ID]) as CountPatientId,[Provider ID]

Resident Table //Table is name of table in which patientid and provider id is present

Group by [Provider ID]

//This will give one more column in Table which is count of PatientID that you are looking.

Left join (Sample)

intervalmatch(CountPatientId)

Load

Min,

Max

Resident;

Left join

Load * Resident

Table1; //Table is name of table in which min and max interval is present

Regards,

Pankaj

antoniotiman
Master III
Master III

Hi Anwar,

maybe

Calculated Dimension :

=Aggr(Class(Count(DISTINCT [Patient ID]),5,'Nr. Patients'),[Provider ID])

Regards,

Antonio

Anonymous
Not applicable
Author

Min and Max is in the Bucket Table(Please see my original post)