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

Get Min/Max of a expression

Hello people,

I hope you can help me with a solution. I've been working over a week without a success result.

I am trying to show a pivot table with three dimensions and three expressions.

Dim: Country, City, Brand.

Exp: Total Sale, Minimum Sale, Maximun Sale.

I need to get a pivot table just like this

Screenshot_1.png

 

So far, I've got the max/min value in one cell of each group, but I need those values in all group cells.

 

Labels (4)
3 Replies
Vegar
MVP
MVP

I see two ways to solve this by epressions. Either by an aggr(nondistinct min()) or a min(total <>) .

 

Screenshot and script is from the attached qvw file. 

image.png

LOAD * inline [
Country, City, Brand, Sales
Norway, Trondheim, B1, 558
Norway, Trondheim, B2, 117
Sweden, Vimmerby, B1, 790
Sweden, Stockholm, B1, 747
Sweden, Stockholm, B2, 601
Sweden, Stockholm, B3, 554
];

 

Lisa_P
Employee
Employee

The pivot table should do this easily.

Country, City and Brand as dimensions

Sum(Sale), Min(Sale), Max(Sale) as expressions

Expand Country and City columns

Brett_Bleess
Former Employee
Former Employee

If Vegar or Lisa's posts helped you with things, please be sure to return to the thread and use the Accept as Solution button on the post(s) that got you what you needed, this closes out the thread, gives the posters credit for the help and lets other Members know what worked, so please be sure you complete this step on your posts rather than leaving them open...  If you are still working on things, please leave an update for us on what you still need help solving.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.