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: 
n1ef5ng1
Creator
Creator

Urgent, if else

I have a column that stated Indonesia Region with another column to all countries including indonesia.

Indonesia - Brunei

Indonesia - Malaysia

Indonesia - China

Indonesia - Indonesia

Indonesia - Singapore

Indonesia - America

Qn is I need two set of formula to derive the data in a column value

One formula for Indonesia - to countries excluding Indonesia

Another formula for Indonesia to Indonesia

Is there any way i can do it?

20 Replies
Sokkorn
Master
Master

Hi n1ef5ng1,

Here you are:

1. =Sum({$<[Indonesia Region] -={'Indonesia - Indonesia'}>} Sales)

2. =Sum({$<[Indonesia Region] ={'Indonesia - Indonesia'}>} Sales)

Regards,

Sokkorn

n1ef5ng1
Creator
Creator
Author

is that under two expression or one expression

Sokkorn
Master
Master

Hi,

Two set analyisis.

Rgds,

Sokkorn

n1ef5ng1
Creator
Creator
Author

This is my code to get Indonesia to Others

=Sum({<

Class_Name = {'Laden'}

,Status = {'T'}

,Unlocode_Place_Of_Loading = {'ID*'}

>} Sales)

This is my code to get Indonesia to Indonesia

=Sum({<

Class_Name = {'Laden'}

,Status = {'T'}

,Unlocode_Place_Of_Loading = {'ID*'}

,Unlocode_Place_of_Discharge = {'ID*'}

>} Sales)

your help is deeply appreciated

Sokkorn
Master
Master

Hi n1ef5ng1,

Can you share your app with sample data?

Regards,

Sokkorn

n1ef5ng1
Creator
Creator
Author

i can't cause i am using personal edition.

How about a simple guaidance?

Tried using if else statement but it does not work.

The problem is to fit in two formula in different condition under one expression

Not applicable

Define a flag for combination Indonesia - Indonesia and Indonesia - Others, then use it anywhere in the appliction, this will solve ur problem.

sivarajs
Specialist II
Specialist II

Try using this expression

if(trim(SubField(Tmp,'-',1))=trim(SubField(Tmp,'-',2)),'Matching','Not Matching')

n1ef5ng1
Creator
Creator
Author

hwo do you define a flag, something new to me