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

set analysis

i have a table of trainings , in which there is eventid, trainingcost and empids of the attendees for the training, in table of employees each employee has departmentid,

i want to distribute the event cost to the departments, like if event A cost occured was 30$, and there were 3 attendees , so the cost will be divided 10$ to each department.

my tables are

eventidcostempids
130emp1
130emp2
130emp3
empiddept
emp1dept1
emp2dept2
emp3dept3

i need to show in some chart, i will take dept as dimension but what would be the expression??

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

5 Replies
giakoum
Partner - Master II
Partner - Master II

See attached files. Note that empids header intrainings table was changed to empid so that an association occures.

Not applicable
Author

Thanks Giakoumakis for the reply, but u have intrepreted cost on each individual separately , where as in my system cost is charged on eventid, not on each individual.

Further my event and attendees are related as hierarchy( i have related them by hierarchy model),

So the picture is like, we have events and events have cost, an event has attendeees and attendees belong to departments.

I need to equally divide the cost of event  on all attendees, and sum the cost occured  on departments

giakoum
Partner - Master II
Partner - Master II

Would it be OK to do in the load statement? Or must it be done in chart?

Not applicable
Author

it would be fine bt how would u distribute the cost (in other table) divide on attendees( in other table )

giakoum
Partner - Master II
Partner - Master II

see attached