Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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