Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Sarath123
Contributor III
Contributor III

how can I write if statement on the script for the below data

Hello,
I have the data as shown below
code     Total sales    company sales   
1101         140000             10000
11010       200000             50000
11020      1000000            90000 

My requirement was to compute company sales per code.
Suppose for code(1101) the cmpny sales are 10000
But I have another condition
for the code(11010) the sales should calculated as   companysales[code(11010)] -  companysales[code(11020)]

I cannot find a way to define that on the script?
Any suggestions!

1 Solution

Accepted Solutions
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

something like this? File attached

View solution in original post

2 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

something like this? File attached

Sarath123
Contributor III
Contributor III
Author

Thank you 😊
It worked