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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
pra_kale
Creator III
Creator III

Hierarchy wise Target vs Achievement giving Issue

Hi,

I have Two files 1 is in which I have Hierarchy and 2 nd in which have Targets and Achievements.

I have imported both this files in qlik and tried to build a Hierarchy wise Achievement %. But, my Achievement % are wrong.

What I want is, Achievement % should be of that individual person only it should not include the Targets or Achievements of below level or upper level persons.

I am attaching a sample excel files as well as application. Below given is the out put which I want in drill down as well.

    

Row LabelsSum of AchievementSum of TargetAchievement %
AAA2400600040.0%
ABC1400210066.7%
BBB1500260057.7%
CDK840120070.0%
DEF1200150080.0%
EFG4200600070.0%
LLL1000150066.7%
RRR1500210071.4%
XXX110001650066.7%
ZZZ1150180063.9%
Grand Total261904130063.4%

Please assist to resolve the issue.

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Pick(Match(GetCurrentField([New Group]), 'Level_1', 'Level_2', 'Level_3'),

Num(Sum(If(Level_1 = EMP_Name, Achievement)) / Sum(If(Level_1 = EMP_Name, Target))*100,0.00),

Num(Sum(If(Level_2 = EMP_Name, Achievement)) / Sum(If(Level_2 = EMP_Name, Target))*100,0.00),

Num(Sum(If(Level_3 = EMP_Name, Achievement)) / Sum(If(Level_3 = EMP_Name, Target))*100,0.00))

View solution in original post

6 Replies
sunny_talwar

May be this:

Pick(Match(GetCurrentField([New Group]), 'Level_1', 'Level_2', 'Level_3'),

Num(Sum(If(Level_1 = EMP_Name, Achievement)) / Sum(If(Level_1 = EMP_Name, Target))*100,0.00),

Num(Sum(If(Level_2 = EMP_Name, Achievement)) / Sum(If(Level_2 = EMP_Name, Target))*100,0.00),

Num(Sum(If(Level_3 = EMP_Name, Achievement)) / Sum(If(Level_3 = EMP_Name, Target))*100,0.00))

jonathandienst
Partner - Champion III
Partner - Champion III

I cannot get to the numbers you posted in the uploaded QVW. For example, for AAA, the achievement is 5000 and the target, leading to a % achievement of 52.08, which is what is reported for AAA. So it all appears to be working as expected.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
pra_kale
Creator III
Creator III
Author

Thanks Sunny...It is working. Great.

pra_kale
Creator III
Creator III
Author

Hi Sunny,

The solution given by you is working perfectly. But, just one more thing want to check with you can I add any variable in this expression like if i want to exclude a current month so how i should write else i have put manually...as I tried at my end just like we used in set analysis but it is not working...can you please guide.


Num(Sum(If(Level_1 = EMP_Name, Achievement)) / Sum(If(Level_1 = EMP_Name, Target))*100,0.00),


Thanks in advance..

sunny_talwar

May be this?

Pick(Match(GetCurrentField([New Group]), 'Level_1', 'Level_2', 'Level_3'),

Num(Sum({<Month = {"$(='<'&Max(Month))"}>}If(Level_1 = EMP_Name, Achievement)) / Sum({<Month = {"$(='<'&Max(Month))"}>}If(Level_1 = EMP_Name, Target))*100,0.00),

Num(Sum({<Month = {"$(='<'&Max(Month))"}>}If(Level_2 = EMP_Name, Achievement)) / Sum({<Month = {"$(='<'&Max(Month))"}>}If(Level_2 = EMP_Name, Target))*100,0.00),

Num(Sum({<Month = {"$(='<'&Max(Month))"}>}If(Level_3 = EMP_Name, Achievement)) / Sum({<Month = {"$(='<'&Max(Month))"}>}If(Level_3 = EMP_Name, Target))*100,0.00))

But this might only be good for your sample where you just have Months 1, 2 and 3. You might need to use MonthYear or Date field to do this exclusion.

pra_kale
Creator III
Creator III
Author

Hi Sunny,

You are really genius....you almost provides a solutions in a fraction of seconds it simply shows your full control over Application. Simply WOW !!!