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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dunnalahk123
Creator III
Creator III

AGGR in QLikview Script

Hi,

Duplicates.PNG

I have one Parent id to that Actual value is 3 but same parent ID has 3 Subtasks  so when i wrote Sum(Actual) i am getting 10 but problem is Sum (Parent Actual ) i should get only 3 as it has same project iD  so my Total should be 10+3 =13.

but right now i am getting 10+9=19 which is wrong .

So how can i write it in back end Qlikview Script.

13 Replies
dunnalahk
Contributor III
Contributor III

It's Working Now. Thank You.

sunny_talwar

To do it in the script... you can use Group by statement... for example

tmpAggr:
LOAD Parent,
     Sum(DISTINCT [Parent Actual]) as SumParent,
     Sum(Actual) as SumChild,
     Sum(DISTINCT [Parent Actual]) + Sum(Actual) as SumOverall
From/Resident ...
Group By Parent;

 

dunnalahk
Contributor III
Contributor III

Thank You Sunny , it's working now. i made a silly syntax error mistake .  

sunny_talwar

Awesome 🙂