Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MEBG93
Creator
Creator

Aggr() with two dimensions

Hello community,

I have been strugling with this one. I want to get the maximum monthly sales value per customer.

I've been using the aggr() function in QlikView and it worked perfectly, but when I apply it to Sense the app freezes. This is what I have: Max(aggr(sum(sales), customer, month))

Thanks in advance,

MEBG

 

Labels (2)
6 Replies
rubenmarin

Hi, I have done similar expressions in sense and they work, where are you using this expression? in a table? In that case: which dimensions are used in that table? Can you try if it works in a table with only customer as dimension?
MEBG93
Creator
Creator
Author

Hello Ruben,

Yes, I'm using it in a table. The dimensions are: Month, customer and the measure should be the maximum monthly sales value. The result I'm looking for should be something like the image attached. So basically, I just want one value per month (max sales) and the name of the customer.

Thanks

 

MEBG93
Creator
Creator
Author

I tried with customer as only dimension but didn't work.
JordyWegman
Partner - Master
Partner - Master

Hi,

When you mention that the app freezes, what the is CPU/RAM usage of your computer/server? The formula looks fine and should do its work perfectly as you describe. Maybe you have a lot of customers? An AGGR() could be quiet heavy for you computer/server if you have a lot of rows.

Jordy

Climber

Work smarter, not harder
MEBG93
Creator
Creator
Author

Nope, actually the dataset is roughly 10000 rows, and only have 9
customers. So idk what could be. If anything helps, I'm currently on qlik
february 2019 patch 1.
JordyWegman
Partner - Master
Partner - Master

Hi,

Trying step by step:

  1. Sum(Sales) in text object
  2. Max(Sum(Sales)) in text object
  3. Max(Aggr(Sum(Sales),Customer)) in text object
  4. Sum(Sales) in table with dimension Customer
  5. Max(Sum(Sales)) in table with dimension Customer
  6. Max(Aggr(Sum(Sales),Customer)) in table with dimension Customer

If this works well, continue with the extra month dimension. If not, see where the problem starts occurring.

Jordy

Climber

Work smarter, not harder