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: 
Anonymous
Not applicable

aggregate vales by relation from a diffrent dataset

Hi everyone,

I have some issues creating a table where an aggregated vale is not directly related to the grouping but the relation is defines in a diffrent set of the data. I tryed to solve the issue wir p() and e() functions in set analysis but couldnt find a solution jet.

I have a set of capacity hours per resource and date. Furthermore i have an assignment of resources to parts.

So data table looks like this.

 

PartResKapDate
10001001.01.2000
10001502.01.2000
10001203.01.2000
10011401.01.2000
10011702.01.2000
10011503.01.2000
10021201.01.2000
10021302.01.2000
10022103.01.2000
A1001
A1002
B1000
C1000
C1001
C1002

Now i want want for each Part to show how nuch capacity the assigned resources have. So i need a sum over the capacity to get the following result.

 

PartKap
A92
B37
C129
Total129
1 Solution

Accepted Solutions
sunny_talwar

Try this

=Sum(Aggr(Sum(TOTAL <Res> Kap), Res, Part))

View solution in original post

3 Replies
Anonymous
Not applicable
Author

I might need to make clear, tht the easy solution of just spliting the data table is not viable as the table is the cental facts table of a quite big datamodell and both fields part and resoucre are already key fields to other tables with lots of realtions.

sunny_talwar

Try this

=Sum(Aggr(Sum(TOTAL <Res> Kap), Res, Part))

Anonymous
Not applicable
Author

Hi Sunny,

Tank you, thats not 100% what i wanted, as totals run in multiples and i had to tweak some set expressions to make it work with further selctions. But your input was the key step to find a working solution and therefore a great help to me.