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: 
Anonymous
Not applicable

Aggregation Dimension against Expression

Dear All

I have Requirement Where i have data in the following Format

CustomerProduct PurchasedDays Purchased
AAA10
BBB20
ACC30
BDD40
AAA50
BBB60
ACC70
BDD80

I Want a chart in the following Format.

Customer No Of ProductLatest Product Purahased(min(days))Slot
AA210 0-30
BB1200-30
AA15031-60
BB24031-60
AA17061-90
BB18061-90

The slot field is just for understanding purpose it should b hided

The bifurcation of customer is done on basis of slots

and the day shown is minimum again each customer for the particular slot .

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You could do it in the front end like this:

Create a straight table chart with two dimensions

=class([Days Purchased],30,'x',1)

as calculated dimension and

Customer

Then create two expressions:

=count([Products Purchased])

and

=max([Days Purchased])

Hide the first, calculated dimension in presentation tab.

You could do similar in the script, creating a flag field to indicate the buckets and then do the expression calculation in a group by load, if you don't need to be sensitive to selections.

Regards,

Stefan

View solution in original post

2 Replies
swuehl
MVP
MVP

You could do it in the front end like this:

Create a straight table chart with two dimensions

=class([Days Purchased],30,'x',1)

as calculated dimension and

Customer

Then create two expressions:

=count([Products Purchased])

and

=max([Days Purchased])

Hide the first, calculated dimension in presentation tab.

You could do similar in the script, creating a flag field to indicate the buckets and then do the expression calculation in a group by load, if you don't need to be sensitive to selections.

Regards,

Stefan

fernando_tonial
Employee
Employee

You can try the Class Function.

Class([Days Purchased], 30)

Don't Worry, be Qlik.