Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to display a field that links to first record of an aggregate calculated dimension

Hi All,

I have a chart/graph where I currently display Sales (Y-axis) vs Customer (X-axis) using

Expression: sum(aggr(count( distinct Customer ID),Customer ID)))

Dimension: Customer

   

SalesCustomerCustomer IDUnique ID
$500Adam1001000
$200Alyssa2001000
$400Carl3002000
$900Daniel4003000
$100Andrew5001000
$430Candice6002000
$700Cory7002000
$350Denise8003000

A new business logic requires that I group customers with same Unique ID for displaying instead of Customer ID, so I need to show something like the 1st Customer in the Unique ID grouping instead of each Customer per Customer ID.


I'm using aggr(Customer, Unique ID) for the new Dimension, but users obviously prefer to read text instead of a cryptic code.

However, I'm having some difficulty trying to show this. In addition, I suppose I have to change Expression to sum(aggr(count( distinct Unique ID),Unique ID)))


My expected output would be something like:

   

SalesCustomerCustomer IDUnique ID
$800Adam1001000
$1,530Carl6002000
$1,250Daniel4003000


The data is calculated 'live' so a LOAD script with GROUP BY wouldn't do. I believe there should be a nice clean expression that would do the trick, though it's been eluding me Not sure if it's a combination of only() or aggr() or some cryptic function.....????


What should I use for the new dimension in order to display Customer (based on Unique ID) for my requirement?


Can anyone help ? Thanks in advance!


5 Replies
hariprasadqv
Creator III
Creator III

Anonymous
Not applicable
Author

Hi hariprasadqv,

Thanks for your reply but I don't think you understand what I'm asking for.

Also I don't see how Peek and Previous can help, since you didn't provide any examples.

hariprasadqv
Creator III
Creator III

Hi William,

Could you please post sample data! so that i can line up.

Not applicable
Author

I Think This could help u

SalesCustomerCustomer ID
800Adam100
1530Carl300
1250Daniel400

is this the output u were looking for

hariprasadqv
Creator III
Creator III

Hi,

This may help you.

Capture4.PNG