Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

If statement SUM calculation

Hi I am trying to achieve the following.

i have three companies

000

001

003

000 and 003 share the same database, therefore i recieve double values when running the following sum for company 003. 001 is correct so no need to worry about that.

what i want to do is half the amount for company 003 based on the following calculation.

psuedo if(company = 003......), otherwise  ->

Sum(OrderRad.ResterandeBelopp * #Dat_O * OH.Kurs_FSG_act)

Best,Brad

1 Solution

Accepted Solutions

Re: If statement SUM calculation

Sum(OrderRad.ResterandeBelopp * #Dat_O * OH.Kurs_FSG_act)

I don't get what this expression says

May be for your requirement expression will be

(Sum({<Company={'000', '003'}>} Sales) * 0.5) + Sum({<Company-={'000', '003'}>} Sales)

2 Replies
Not applicable

Re: If statement SUM calculation

try this

if(company = 003,Values*0.5,Values)

Re: If statement SUM calculation

Sum(OrderRad.ResterandeBelopp * #Dat_O * OH.Kurs_FSG_act)

I don't get what this expression says

May be for your requirement expression will be

(Sum({<Company={'000', '003'}>} Sales) * 0.5) + Sum({<Company-={'000', '003'}>} Sales)

Community Browser