Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnuchinni
Creator III
Creator III

Is it possible to give two names for one condition ?

Hi All,

Is it possible to give two names for one condition. say I have Country and Group:

if(ountry = 'AU' or Country ='IN' and Group = 'A' ,'ABC' or 'XYZ' , Group) as New_Group;

like above Just I want to give same name "ABC" and "XYZ" if condition satisfied, otherwise it will display "Group"

 

Regards

Praveen

 

5 Replies
pepecc
Contributor III
Contributor III

Try nesting if conditions. Something like this:

 

if(condition1,if(condition2,Result true condition 2,result false condition 2), result false condition 1)

 

Regards.

joseph_morales
Creator II
Creator II

Try with IF and Match

 

if(match(Country,'AU','IN') and  match(Group,'A' ,'ABC','XYZ'),Group) as New_Group;

 

Regards

Best Regards,
Joseph Morales
chinnuchinni
Creator III
Creator III
Author

that is not working.

please find below clarification about my requirement.

Category                                     Sales

A  (B-Soft +C-Hard)                    1000

B-Soft                                             2000

C-Hard                                           3000

 

Required Result:

Category                          Sales

B-Soft(A+B-Soft)           3000

C-Soft(A+ C-Hard)         4000

 

 

Brett_Bleess
Former Employee
Former Employee

Praveen, most likely going to need a sample app with some data so folks can see the underlying data model etc. to determine the proper method to get what you want on this one...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
marcus_sommer

Your grouping criteria are overlapping and therefore you couldn't do in this way. One approach to bypass it could be to duplicate some your data and grouping one so and the other different. But you need to be carefully with it to ensure that only certain measures access the duplicates and the others not.

An alternatively might be to implement an The-As-Of-Table.

- Marcus