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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
srinivas1921
Contributor III
Contributor III

How to display top 3 Contract Names when same contract names are there?

Hi,

one of our requirement is need to display top 3 contract Names based on amount value in the Bar chart.But when I trying to display top 3 contract Names it was showing wrong values due to grouped by Contract Name.

Please see below tables and suggest me solution on this to expected results.

Actual Data:-

Contract NumberContract NameAmount
121AAA100
122BBB50
123AAA62
124CCC55
125DDD80

showing output in the Bar Chart as below:-

Contract NameAmount
AAA162
DDD80
CCC55

Expected Output as below:-

Contract NameAmount
AAA100
DDD80
AAA62
14 Replies
srinivas1921
Contributor III
Contributor III
Author

Hi Sunny,

your solution working fine but in my bar chart displaying two dimensions like parent contract name and calculated dimesion. I want to display only Parent contract name only.please suggest.

sunny_talwar

Try this script:

Table:

LOAD Dual([Contract Name], AutoNumber([Contract Number]&[Contract Name])) as [Dim Contract Name],

  [Contract Number],

    [Contract Name],

    Amount

FROM

[https://community.qlik.com/thread/233795]

(html, codepage is 1252, embedded labels, table is @1);

Bar Chart

Dimension

[Dim Contract Name]

Expression

=Sum({<[Dim Contract Name] = {"=Rank(Sum(Amount)) < 4"}>}Amount)

Capture.PNG

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey there,

You want something like this?

Please see the attached file

Best regards,

D.A. MB

miguelbraga
Partner - Specialist III
Partner - Specialist III

Even better now

Best regards,

D.A. MB

srinivas1921
Contributor III
Contributor III
Author

Thank u very much Sunny