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

Highlight max value in a pivot Table

Hi QlikView Community,

i have a question how to higlight the max value in a pivot Table with 2 Dimensions.

How can I highlight the max value per Company, regarding which products they bought?

I created a file with some sample data.

The formula works, when I select a certain customer, it will show me the product with the max sales value.

Max1.png

I used the following formula to highlight the max value

if(sum(Sales)=max(total aggr(Sum( Sales),Product)),green())

But if I don't select a company, it doesn't work:

max2.png

I did a lot of trial and error with the aggr() function, but adding Company to the aggr function will only lead qlikview to show the highest sales per Customer and Product combined.

Does anybody have an idea how i can highlight the highest selling product per company in the pivot without having to select anything?

I also attached the qvw with my sample data.

Thanks for your help!

Fabian

1 Solution

Accepted Solutions
mdmukramali
Specialist III
Specialist III

Dear Fabian Heidenstecker,

can you use the below expression.

=If(Sales =Max(TOTAL <Company> aggr(Sum(Sales),Company,Product)),Green())

kindly find the attachment.

i hope it will help you.

Thanks,

Mukram.

View solution in original post

2 Replies
mdmukramali
Specialist III
Specialist III

Dear Fabian Heidenstecker,

can you use the below expression.

=If(Sales =Max(TOTAL <Company> aggr(Sum(Sales),Company,Product)),Green())

kindly find the attachment.

i hope it will help you.

Thanks,

Mukram.

fheidenstecker
Creator II
Creator II
Author

Thanks Mohammed Mukram Ali that works like a charm!

These angle brackets magic seems to be quite helpful sometimes 🙂

Cheers,

Fabian