Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ramrongala
Contributor II
Contributor II

how to show highest sum sales and related region in text obj and how to calculate % in straight table

Hi Guys,

I struck some issue. here 1) i want display highest sum(sales) and corresponding Region in text object

                                       2) i want calculate % but not using ''Relative'' in Expression tab .  if any formula or code.

like below screen shots

highst.png

In text i am using below code :  "max(aggr( Sum( sales), Region))" it display only highest value but not region

i am using this code also:  Aggr(max(aggr( Sum( sales), Region)),Region) but no use.

Please solve my problem ASAP Tomorrow i submit my project.

1 Solution

Accepted Solutions
sunny_talwar

Try with a lower case s in sales

FirstSortedValue(Region, -Aggr(Sum(sales), Region))

Max(Aggr(Sum(sales), Region))

View solution in original post

6 Replies
sunny_talwar

1)

This will give you the region:

FirstSortedValue(Region, -Aggr(Sum(Sales), Region))

Max Sales

Max(Aggr(Sum(Sales), Region))

2) For percentage

Count(Region)/Count(TOTAL Region)

or check 'Relative' on the expression tab

ramrongala
Contributor II
Contributor II
Author

Thanks Bro,

2nd one working fine. But 1st one not giving any value some error as come

ramrongala
Contributor II
Contributor II
Author

Error Message :Bad field name(s):sales

sunny_talwar

Try with a lower case s in sales

FirstSortedValue(Region, -Aggr(Sum(sales), Region))

Max(Aggr(Sum(sales), Region))

ramrongala
Contributor II
Contributor II
Author

Bro Really Thanks..working fine

s4ni9r
Contributor III
Contributor III

Sunny Sir,

I have requirement,

Item URL Style Sales
10012 Image1 NY30 1000
10013 Image2 NY30 550
10014 Image3 NY30 4000
10015 Image4 NY30 3000
10016 Image5 NY30 10000
10017 Image6 NY30 450
10018 Image7 NY30 360
10019 Image8 NY30 4000
20019 Image1 NY50 4000
20019 Image2 NY50 95000
20019 Image3 NY50 1323
20019 Image4 NY50 11200
20019 Image5 NY50 7689

 

Need to show the Image for Max Sales within each StyleCode,

Can we acheive without using FirstSortedValue?