Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

[QLik Sense]Doubled value when adding up partial ones?

In a table I have these 3 fields: Salary, time_spent_month and time_spent_month_per_project.

I want firstly find the partial salary corresponding to a project. So I create a new measure with the following formula:

[salary]/[time_spent_month]*[time_spent_month_per_project] => I get the right value in this part.


I create then this formula:

sum([salary]/[time_spent_month]*[time_spent_month_per_project])


Obviously, by adding up all these partial salary, it must return the value of salary. However, it gets double.

Could you please explain me why and correct me in these formula?

Thank you a lot!

6 Replies
sunny_talwar

Are all the three fields mentioned above come from the same table?

Not applicable
Author

Yes.

sunny_talwar

Not sure what might be going on. Would you be able to share a sample to see what might be going on?

reddy-s
Master II
Master II

Hi Quyen,

There could be a possibility that due to a join the records are being doubled and hence resulting in the doubled values.

Are you using any joins in your script?

Thanks,

Sangram.

Not applicable
Author

Thank you Sunny T and SangGram Reddy for your suggestions! I found it!

There are indeed 2 almost similar tables that are imported to the app, which result in the doubled values!

Thank you for your helps so much!

reddy-s
Master II
Master II

Always Welcome!