Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
CELAMBARASAN
Partner - Champion
Partner - Champion

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)

View solution in original post

2 Replies
Not applicable
Author

try this

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

CELAMBARASAN
Partner - Champion
Partner - Champion

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)