# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for
Did you mean:
Contributor III

## multiply different factors

Hello there,

Help me with this please: I need to calculate the "Result Taxes" of multiple Companies.

 Company Taxes Turnover Cost A 0.2 100 50 B 0.3 150 25 C 0.2 200 70

Also, I Have different money Exchange rate:

 Money exchange_rate Dolar 700 Eur 900

I have this variable working fine:

vTurnover= [Turnover]*[exchange_rate]

vCost =[Cost]*[exchange_rate]

vResult= vTurnover - vCost

But I tried to calculated Result Taxes this way:

=vResult*Taxes

the result is showing correctly when companies selected have the same Taxes values, Like Companie A and C, if Companies A and B are selected no result is shown.

How I can solve this?

Labels (1)
• ### Qlik Sense

1 Solution

Accepted Solutions
Creator

try this.

vResultTax=sum(((Turnover-Cost)*exchange_rate)*Taxes)

6 Replies

Perhaps this?

((Sum([Turnover])*Sum([exchange_rate]))-(Sum([Cost])*Sum([exchange_rate])))*Sum(Taxes)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Contributor III
Author

Thanks, but that isn't the result.

Creator

try this.

vResultTax=sum(((Turnover-Cost)*exchange_rate)*Taxes)

When you say that is not the expected result, can you brief little more to understand?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Contributor III
Author

Anil, isn't correct because you sum all Taxes values and this result is multiplied by the other values.

In my tables, if companies A and B are selected, SUM(taxes) = 0,5. Is not the expected result.

Thanks anyway.

Contributor III
Author

Thanks JMarouf, That worked!

But my real code is pretty more complicated than I resume here, I expected to calculate the Tax using my variables directly, but I think isn't possible.

Tags
Community Browser