Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

I want to use a 'If' stament comparing two row's and if the values of both of them are same then they must show name of one another row??? Any help

Final ratingSLACalculation                      

3                              3                                                 xxx

4                              5                                                 yyy

4                              4                                                 zzz

Now it must show only yyy as it is odd one out

Tags (2)
1 Solution

Accepted Solutions
prashantbaste
Contributor II

Re: I want to use a 'If' stament comparing two row's and if the values of both of them are same then they must show name of one another row??? Any help

Hi

Try below expression.

=If([Final rating] = [SLACalculation], ColNametoDisplay)

May be your dimensions are =>  [Final rating] & [SLACalculation]

And above mentioned Expression as Expression.

Just confirm if it resolves your query.

--

Regards,

Prashant P Baste

5 Replies
prashantbaste
Contributor II

Re: I want to use a 'If' stament comparing two row's and if the values of both of them are same then they must show name of one another row??? Any help

Hi

Try below expression.

=If([Final rating] = [SLACalculation], ColNametoDisplay)

May be your dimensions are =>  [Final rating] & [SLACalculation]

And above mentioned Expression as Expression.

Just confirm if it resolves your query.

--

Regards,

Prashant P Baste

Employee
Employee

Re: I want to use a 'If' stament comparing two row's and if the values of both of them are same then they must show name of one another row??? Any help

Generally I would advise on deciding what method to use, instead focus on you incoming data and the expected result. From that then evaluate the best option to achieve your requirement.

Your description is a bit vague in this case, as you have not defined if the result to be achieved in script or chart object. To a solution this will make some difference.

One way of doing this as in the attached script

Not applicable

Re: I want to use a 'If' stament comparing two row's and if the values of both of them are same then they must show name of one another row??? Any help

Thank you so very much for your help.!

Another qu.

If there is a column with location all locations starts wit SL.  now i want to remove this SL. but the thing is some of them dont have this so the right and mid comand is actualy cutting the first 3 letter so anything we can do for only selcting SL. and deleting the SL. only from SL.Mumbai and etc.

Location name

SL.Mumbai

SL.Gurgaon

Latur                 Here Lat is cutted if right or mid is used

SL.Chennai

Not applicable

Re: I want to use a 'If' stament comparing two row's and if the values of both of them are same then they must show name of one another row??? Any help

Thank you so very much !!

@tori kautto

prashantbaste
Contributor II

Re: I want to use a 'If' stament comparing two row's and if the values of both of them are same then they must show name of one another row??? Any help

Hi

Try this - subfield(location, 'SL.' ,1);