Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
kakani87
Specialist
Specialist

Display Salary contribution Product wise based on time spent

Hi Folks .....

I'm having a requirement to show the employee contribution based on the time spent in a day for a product

Here a person work job details considered from a table called LT_JOB_ENTRY and the salary details from salary tables with employee codes

now coming to the requirement i want to  display is monthly salary of an employee to be divided into day wise salary and that day salary need to be displayed by the time worked for product and that contribution

i.e. lets say an employee worked for 8 hrs in a day for to projects/products like 3 hrs on one product and 5 hrs on another product

now to display contribution of a day product wise

e_code , product , spent_time , value

emp1 , Prod1 , 5hrs

emp1 , Prod2 , 3hrs

the value should be like month salary / days

this has to be assigned according to the hours contributed for a product.

Spent time was displayed in  Mins

Can any one help me to come out of this scenario

stalwar1

6 Replies
ogautier62
Specialist II
Specialist II

Hi,

spent_time / sum(total <e_code> spent_time) * emp_salary ?

regards

sunny_talwar

Based on the data provided, what is the expected output that you would want to see?

kakani87
Specialist
Specialist
Author

I'm building a costing dashboard for an organisation

I'm having salary table and another is daily task done entries table called as Lt_table

here i want to display the monthly salary to be divided into 30

In the LT entry table it consists of in a day employee worked tasks details on which project/product and time spent

if an employee worked with two projects then as 3 hrs on one and 5 hrs on another and his salary is 30000 per month then this should be divided by 30 (i.e.days)

Finally i wanted to show in a month that 30000 contributed to  employee  as cost for the project's he worked

like product A - 10000

       product B - 20000

If any thing I'm not able to present properly kindly  question me regarding this

kakani87
Specialist
Specialist
Author

Header 1Header 2Header 3Header 4Header 5Header 6Header 7
Emp_codeProductTimespentSalary_COntributionMonthly
c000838A300 mins625
c000838B180 mins375

so if an employee salary is 30000 then divide salary by 30 days now 1000 is per day

this 1000 contribution again divided by product wise as shown in the above table

But all this calculation to do back end and display monthly salary contribution for product wise of an employee

sunny_talwar

Try this

Sum(TOTAL <emp_code> salary)*(spent_time/Aggr(NODISTINCT Sum(DISTINCT spent_time), emp_code))/30

ogautier62
Specialist II
Specialist II

so

spent_time / sum(total <e_code> spent_time) * emp_salary /30