
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AGGR in QLikview Script
Hi,
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.
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What exactly are you looking to do in the script? You want to do the Sum() in the script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny,
Yes , Basically in the example i have given 1 parent value is getting repeated for 3 times as it has 3 child.
My Numerator is Sum(Parent Actual) >>> right now i am getting 3+3+3=9 but i should get once per Parent. so i should get 3 as my numerator as Parent is same . (Basically it should sum only once per Parent)
Sum(Parent Actual) as Numerator----It should come only once per Parent ( this how can i write in back end script ?)
Sum(Actual) as Denominator -- no problem as i am summing at child level it comes correctly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be like:
Sum(Distinct [Parent Actual])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or this
Sum(Aggr(Sum(DISTINCT [Parent Actual]), [Parent]))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny,
can i give it in back end script ? i tried in back end script but its not taking it .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried in back end script but it failed saying invalid expression.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You want to pre-aggregate the data in the script? Is that what you are trying to do?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny,
Yes, when pull to front end it should be just sum(numerator ) / sum(denominator) everything should be derived at back end script itself.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny,
Please let me know if i am not clear.
Best Regards,
HK

- « Previous Replies
-
- 1
- 2
- Next Replies »