6 Replies Latest reply: Feb 25, 2016 12:44 PM by Sangram Reddy

# [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!

• ###### Re: [QLik Sense]Doubled value when adding up partial ones?

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

• ###### Re: [QLik Sense]Doubled value when adding up partial ones?

Yes.

• ###### Re: [QLik Sense]Doubled value when adding up partial ones?

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

• ###### Re: [QLik Sense]Doubled value when adding up partial ones?

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.

• ###### Re: [QLik Sense]Doubled value when adding up partial ones?

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!

• ###### Re: [QLik Sense]Doubled value when adding up partial ones?

Always Welcome!