# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

## Set analysis help

Hi

I wrote the set to calculate the amount as

sum({<Company={A},Branch={'X','Y','Z'}>}Amount)+sum({<Company={B},Branch={'X','W','A'}>}Amount)

the problem is when i select the company A, then the amount should show

only for the Company A, but here the value shows both A and B irrespective of the Company selections.

Could anyone help me.

1 Solution

Accepted Solutions
Contributor III

## Set analysis help

\$ is entirely optional here.

Try this:

sum({<Company={A}*P(Company),Branch={'X','Y','Z'}>}Amount)+sum({<Company={B}*P(Company),Branch={'X','W','A'}>}Amount)

Be careful, though - if you select Company C (if there is one), nothing will get shown.

3 Replies
MVP

## Set analysis help

Hi,

Use the expression with \$

sum({\$<Company={A},Branch={'X','Y','Z'}>}Amount)+sum({\$<Company={B},Branch={'X','W','A'}>}Amount)

Hope it helps

Celambarasan

Contributor III

## Set analysis help

\$ is entirely optional here.

Try this:

sum({<Company={A}*P(Company),Branch={'X','Y','Z'}>}Amount)+sum({<Company={B}*P(Company),Branch={'X','W','A'}>}Amount)

Be careful, though - if you select Company C (if there is one), nothing will get shown.

Highlighted
Not applicable

## Set analysis help

Thank you very much....