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: 
jakobjosef
Creator II
Creator II

Needed dimension for correct calculation

Good morning dear qlik-view-community,

I'm stuck with a problem and do absolutely not know how to solve it. Maybe you can help me, I hope that it is a "typical" problem with an not-to-complicated solution.

My aim is to show the costs of idle-times ("empty hours") of employees. Those get calculated in following way: idle times multiplied with hourly wage:

Idle.PNG

Every employee has its individual hourly wage, and thats the problem. I want to show the costs of idle times on a monthly basis, without employees. But for correct calculation, I need the dimension "employee", because without this dimension, QV does not know which hourly wage to take.

I would love a result like this:

Idle2.PNG

Does somebody know how to solve this problem? Do I have to use Aggregation-funktion? Or should I hide columns?
I really would appreciate some hints.


Have a nice day & thank you

Jakob

1 Solution

Accepted Solutions
marcus_sommer

You need an aggr() for it - something like:

sum(aggr(sum([Idle Times] * [hourly wages]), Name, Month))

- Marcus

View solution in original post

7 Replies
vishsaggi
Champion III
Champion III

use straight table and add Month as your dimension

Dim:

Month

Expr:

= Sum(IdleTimes)

= Sum(IdleTimes * HourlyWage)

Capture.PNG

andrey_krylov
Specialist
Specialist

Strangely enough, because QV knows which hourly wage to take  and result must be as you expect. Could you provide the expression or qvw?

marcus_sommer

You need an aggr() for it - something like:

sum(aggr(sum([Idle Times] * [hourly wages]), Name, Month))

- Marcus

jakobjosef
Creator II
Creator II
Author

Thank you guys for your answer,

due to technical problems I am not able to try your solutions, but as soon as my problem is fixed I ll try .

Have a nice day,
Jakob

jakobjosef
Creator II
Creator II
Author

Hi guys,

I fixed my problems and prepared a File for you, so maybe you can show me your solution with your QVD-File:

QV-IdleTime.xlsx

There you also find again the description of my problem.


Thank you very much

Jakob

andrey_krylov
Specialist
Specialist

See attached, Jacob

jakobjosef
Creator II
Creator II
Author

Thank you so much, I've finally been able to solve my problem.

Jakob