Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Top 1 SAL

Hi All,

I want to show the Top 1 SAL of the Employee details for each JOB and each LOC and for each Year,Quarter as shown below.

Thanks in advance.

      

EMPNOENAMEJOBMGRLOCDNAMESAL
7902FORDANALYST7566INACCOUNTING50400
7698BLAKEMANAGER7839USRESEARCH24200
7839KINGPRESIDENTNULLUKSALES23200
1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

Aggr(If(Rank(sum(Sales), 1, 1) = 1, Rank(Sum(Sales),1,1)), JOB, Region, YEAR, QUARTER, EMPNO)

Regards,

Jagan.

View solution in original post

11 Replies
sunny_talwar

Working with PE of QV. If you can share the source data with expected output, I might be able to help

qlikviewwizard
Master II
Master II
Author

Hi Sunny,

Please find the data in text file.

Expected result has been shown in post.

Thank you.

sunny_talwar

Your output shows only three jobs what about the about the other two jobs???

qlikviewwizard
Master II
Master II
Author

Yes,I do provide remaining as well. Thank you.

sunny_talwar

Is this what you are looking for?

Capture.PNG

sunny_talwar

Updated:

Capture.PNG

qlikviewwizard
Master II
Master II
Author

Hi Sunny,

Something like this.

    

EMPNOENAMEJOBQUARTERYEARSalesCOMMRegion
7902FORDANALYSTQ320155120768IN
7876ADAMSCLERKQ120153120468US
7839KINGPRESIDENTQ120152970445.5UK
7844TURNERSALESMANQ420152570385.5IN
7521WARDSALESMANQ120151720258UK
7369SMITHCLERKQ12015920138US
7902FORDANALYSTQ320145120768IN
7876ADAMSCLERKQ120143120468US
7839KINGPRESIDENTQ120142970445.5UK
7698BLAKEMANAGERQ220142955443.25US
7844TURNERSALESMANQ420142570385.5IN
7369SMITHCLERKQ12014920138US
sunny_talwar

You want it for -> Top 1 SAL of the Employee details for each JOB and each LOC and for each Year,Quarter

I still don't see all combinations here. For instance we have just Q3 for Analyst in 2015 in IN. What about Q2, Q1 for Analyst in 2015 in IN? what about other locations?

Can you make sure that you want it for each JOB, LOC, Year and Quarter?

qlikviewwizard
Master II
Master II
Author

I want to see the data per LOC,JOB ,YEAR, QUARTER.

Sorry, I did not provide the correct required output data.

Thank you.